Skip to main content
March 15, 2007
Question

loadVariables timing issue

  • March 15, 2007
  • 1 reply
  • 194 views
Can I use the results of loading a variables file using loadVariables on the very next frame? Or do I need to build in a set number of frames delay before trying to use the variables being populated by the load statement?

Right now I am only giving one frame spacing from execution of the loadVariables and I try to use the variables on the next frame with sporadic results. Is next frame use overly optimistic? What is a good coding practice if there is a timing issue with using the results of loadVariables?

Here is script I am using...

quote:

loadVariables("MyVars.txt", _root);


Thanks!

Bob
This topic has been closed for replies.

1 reply

Inspiring
March 15, 2007
the LoadVars class has a great onLoad event which will solve all your problems, and buy you dinner. Czech it out, and let me know if you see what I mean.