I have this code in as2, it works great, but I need to adapt it to flash5
myName is the variable asociated to a dinamic text on the flash, it shows the hello but never the good bye even if I comment the line myName=”hello”;
how can I replicate this to work on flash 5?
myName="hello";
myVars = new LoadVars();
myVars.load("getScores.php");
myVars.onData = function(raw) {
myName="good bye";
}
LoadVarsis a class of Actionscript 2.0 so it is not supported in Flash 5.You should use instead the
loadVariablesmethod of Actionscript 1.0 and using a code such aswith this code the
dataevent is fired after variables loading. You must put this code on a movieclip instance (not on timeline).