I built a flash file (Flash 5, ASP 3.0, SQL Server) that allows users to search for our clients by company name. I have the results come back and display all matching company names in a dynamic text box. This part is working correctly.
What I want to do is allow the users to click on a given company name in that inital resultset, requery the database and bring back detailed client information for the respective company name chosen.
When I do this in just straight ASP coding, usually I wrap a link around a company name, build the company id into a querystring and pass back the resultset. Then the user clicks on a company name and they see the corresponding info. I am not sure how to do this in flash.
If someone could point me in the right direction, I would be most appreciative.
If you construct your query in a separate asp page you can call that page using loadVariables()/ loadVariablesNum(). This method also allow you to pass variables - in this case your company name via GET or POST headers just as you would in a standard < a href> or < form>
The principal difference between loadVariables() and loadVariablesNum() is that loadVariablesNum() allows you to specify a _level (_level0 by default) while loadVariables() allows you to specify an instance of a movie clip. This is important because if you send variables using GET or POST then <b>all the variables </b> in the _level or instance are posted which can often be a nuisance (as well as creating unnecessary headroom and latency).
Often the cleanest solution is to declare the variables you want to POST within a MC instance then use loadVariables() to specify that MC. This method has the added advantage that allows you to use the inbuilt method onClipEvent(data) if you need to process the result.