in flash mx I've got a swf which has a 2nd swf loading into an empty movie clip within it. on the 2nd swf there is a loadvariables action that calls a php text file. the text file holds the names of people who logged on to the first host swf.when i play the 2nd swf thru the player i can see the names so it looks like the code is calling the text file correctly.
This is what I put in 2nd swf's fla.This actionscript is on the frame that houses the movie clip gauntlet (which contains the name box called name4).
_root.gauntlet.loadVariables("user4.txt", "POST");
name4 = name4;
I've also put an identical name box in the same frame as the above actionscript AND put a copy of it (with a copy of the above code )inside gaunlet MC for good measure. As I've said I can see the names filling BOTH boxes when i play the 2nd swf thru the player. When it loads into the host swf though the boxes are blank.
unfortunately when i load the host movie (which loads the 2nd swf) the name boxes are blank!it looks like a path error but i haven't figured it out yet, any ideas anyone?

    I have encountered that problem.. Heres how i solved it...

    Never use absolute references on a movie you will be loading from a host movie, like root.whatever, since when you are loading the movie within another movie the root reference you put on the second movie refers now to the host movie.. try to use
    relative references like this.whatever or just "whatever".

    or you can use absolute references on the movie that you are loading inside another movie but you must include the name of
    the empty movie clip that you will be loading the second movie clip into. for example on the host movie you will be loading the second movie on an empty movie clip name "placeholder". so on the second movie clip all you absolute reference must be changed to _root.placeholder.whatever. If you compile just the second movie you can see anything... but if you compile the second first(dont mind the errors and thae fact that it wont work) and them compile the first. Surely it will work..

    Hope this helps...

      Write a Reply...