To my geeky friends…
I’ve come across this puzzle, I hope you guys can help me figure it out.
It really is quite simple. I have a text file called sites.txt. I want to load the variables from that file and use them in my movie. I have a dynamic text box on my _root. I called it Mybox.
Here’s the puzzle.
This doesn’t work
newload=new loadVars();
newload.load("sites.txt");
newload.onLoad=function(){
trace(newload.toString());
}
_root.mybox.text=newload.hello;
But, this one works.
newload=new loadVars();
newload.load("sites.txt");
newload.onLoad=function(){
trace(newload.toString());
_root.mybox.text=newload.hello;
}
Notice that the only change is the location of the “_root.mybox.text=newload.hello;” piece of code. However, this variable is supposed to be available anywhere else in the movie.
Once we talk about this one, I’ll give you a second, similar puzzle with loadvariables();