Externally loaded text in relation to the timeline

nornholdj

Novice

Posts: 18

3+ Months Ago

Hi,

I am using an external xml file to load text into several of my MovieClip's frames (which act as different pages) Some of the text is shown on all the frames (such as links for them menu system). They all load initially but when I click on a button to go to another frame it gets replaced with the default text.

Like I said I am loading the text into a: var myXML:XML does that object get disposed when I move to another frame? I tried loading it into a XML var in one frame and then accessing that var in another frame later on and I get an error saying its a null reference. Do I have to reload the XML on every frame? That seems very inefficient.

ATNO/TW

Super Moderator

Posts: 23473

Loc: Woodbridge VA

3+ Months Ago

make the variable global. Then you can access it anywhere in your movie.The way you are doing it the variable is only available to that movie clip and you'll have to redefine it in all the rest.

Check out this tutehttp://www.tutorialized.com/tutorial/Gl ... ables/4937

nornholdj

Novice

Posts: 18

3+ Months Ago

Would I still have to reinitialize all of the text fields to values from the xml document in each frame?

ATNO/TW

Super Moderator

Posts: 23473

Loc: Woodbridge VA

3+ Months Ago

The way I'm interpreting your description of what you're doing I believe the answer to that is yes.