Forum Moderators: open
Thanks for your help.
-Matt
Ive found that if you have a script that pulls what you need out of database and echos (dont know asp equivilent;)) it out like this:
var1=blah&var2=blah&var3=foo etc
so if you were to goto script url and view source in browser you would see just that var1 etc, no html or anything, you can then call it into flash using something like:
var myVars = new LoadVars();
myVars.onLoad = function(ok) {
if (ok) {
holdermc.box1.text = myVars.var1;
holdermc.box2.text = myVars.var2;
}
};
myVars.load("http://path to script.asp");
holdermc is the 'instance' name of a movieclip to recieve the data.
box1 and box2 are the 'instance' names and 'variable' names of dynamic text boxes that are within the holdermc movieclip that are going to contain the recieved variables, var1 and var2 in this case.
this should load the variables into the dynamic text boxes. obviously you can add as many text boxes as you have variables produced by the script - just add more lines in this format: holdermc.box2.text = myVars.var2;
the last line: myVars.load("http://path to script.asp"); can also have parameters append to the url. in the?usual=way.
the parameters append can also be dynamic, e.g from a input box, just use a variable to hold the info you want to pass and added it like this:
myVars.load("http://path to script.asp?subject="+SUBJECT);
where SUBJECT is a variable containg the output from a input or whtever.
finally, if you then need to animate the recieved data, just animate the contating movieclip as normal. if different data needs different animations, create two or movie 'holdermc' type movieclips - with different instance names.
sorry for going on and on.
ben