Im loading variables from a text file into my main timeline. There are many variables in the text file but the key one i am having trouble with is OPTIONS=6.
I later call that variable from the main timeline from a MC nested far within my movie by using
OPTIONS=_root.OPTIONS
then i use a for loop to duplicate a MC 5 more times
if i manually specify OPTIONS=6 on my main timeline the whole thing works
i have already made a loop that checks to see if my textfile is loaded by adding loaded=done at the bottom of my textfile and in my main timeline i use
to stop my movie from playing until all variables are loaded
also…i know its not a problem with my code that loads my text file cause i call many other variables from that file and they all work in the rest of my movie
ok all you flash gods im praying you will have the answer
if (loaded==“done”) {
gotoAndStop(5);
} else {
gotoAndPlay(2);
}
b) remember that Flash is case sensitive. If you’re using it as all caps in the Flash file, make sure it’s all caps in the text file.
Other than that, I’m not sure what could be the problem. It looks like it should work. If you don’t find an error somewhere, maybe I’ll take a look at the files for you… I’m kind of in the middle of doing this myself, though I’m working with PHP to import a mysql database table, it’s basicaly the same thing once you get it inside Flash.
I had just thought of that while I was reading your explination… good catch. I think that I’m having a similar problem, which I hope that your solution will solve. Thanks for the info.
as a secondary note… in addition to the “eq” being taken over by “==”
The “OPT” add UPDATE in your for loop should use “+” not “add”.
Those two are just depreciated terms and may still work in Flash MX, but definitely as time goes on they will be illiminated. So eventually you’ll need to use them anyway.
btw, thanks sooooo much… I’ve been having a problem with a guestbook that I’m making, and it hasn’t worked right all week. parseInt(); was EXACTLY what I was looking for.
No problem…parseInt() seems to work great for me on my hard drive but as soon as I load it to a server to use on the web some of my variables return NaN…strange. You say you have solved that on the actionscript forum? What post might that solution be in?