hi
i am using loadvars to load url encoded data from a php file.
when i trace the output it shows that the variables have been retrived
successfully.
now i need to use the values by assingning then to a variable. i cant seem to
get this going
i am using flash 8 with as2.
myVars.onLoad = function (success) {
if (success) {
trace (" variables loaded ");
ad1id.text = myVars.ad1id;
ad1src.text = myVars.ad1src;
clipid.text = myVars.clipid;
clipsrc.text = myVars.clipsrc;
ad2id.text = myVars.ad2id;
ad2src.text = myVars.ad2src;
} else {
trace (" Error loading variables ");
}
}
is the above method used for assigning the variables correct.
ram
MotionMaker - 28 Jun 2007 19:33 GMT
The method look fine.
Inside the success if block, you need to trace the data:
trace("myVars:" + myVars);
trace("myVars.ad1id:" myVars.ad1id);
Also send the same inputs to the PHP script via an HTML form or on the address
line and see what is returned.