This content has been marked as final. Show 4 replies
try putting the return variables INSIDE the onLoad function - that way they wont be returned until the onLoad is called
Yes, the vars need to be at the bottom of the if(bSuccess) code group. ALSO, if your project uses the timeline (ie you load them in frame 1 the movie continues to play) you will need to put a stop(); on the frame where you load the vars and then at the end of the if(bSuccess) code group, have play();
If you don't do that, half the time your variables will get read and the other half they won't because while flash is going out to get the vars, the timeline has moved on and left them behind.
i have tried to put return in onLoad function then i get error that getVariables function hasno return statement
correct. so, don't use a return in your onLoad method. simply define your array aVariables in you onLoad method and then call another function passing your array as a parameter. or don't make your array local to getVariables.