My loadMovies load txt files

Hi im using th loadMovie to load 2 seperate movies into one main movie. One of the movie im loading in, loads varaibles from a text file. Currently I do this inside the movie itself. The movie loads fine with

loadMovie("movie1.swf", _root,holder");

except it seems that the individual movie itself hasnt had enough time to load it vars from the text file. Imhaving trouble getting my brain around this as I also am having troubles with a preloader, but If i could get this working, im half way there. Anyway I gather I should probably be doing the following steps;

1)loading the contents of any text files into LoadVars objects in the main movie.
2) then when I use loadMovie(), pass the relevenat LoadVars Obj (which has the vars from a textfile) to the relevant movie (swf) being loaded

->Can anyone offer some advice?, point me in the right direction? or provide a code snippet?

~ Ideally if I could get this working and the preloader (which reads bytes of the loaded swf in “holder”) I could sleep a little better

Here’s an idea to get the preloader working and everything else:

in the movie1.swf:
place the text into a guide layer, the preloader will work that way, then after it is done loading run you loadVariables();

make sense?

unless the text takes forever to load you don’t really need a preloader.

Nate

Hmm ‘Guide Layer’??

You mean have a textfield off the stage, load text into it, then load text from this ‘hidden textfield’ into the real textfield ?

You could do it that way. But the only problem with that is when you want to add or decrease the text. You’d have to change the .fla, you could have an external .swf that holds an image, dynamically load it, preload that, then unload it and load movie1.swf and do loadvars.

just tryin to think of different ways to get it to work. I always seem to think of 20 different ways to skin the cat. heh.

Nate

Funny enough Ive got it working pretty much perfectly now. I have a main container movie which has its own preloader, and on
total_bytes == loaded_bytes calls a initialisation function which loads txt files into LoadVars Obj’s > then loads movies with “POST” into a holder clip. There’s more to it, thats just in summary, but thankfully Ive got my head around it! :slight_smile: