Externally loaded text in relation to the timeline

  • nornholdj
  • Novice
  • Novice
  • User avatar
  • Posts: 18

Post 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.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 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 tute
http://www.tutorialized.com/tutorial/Gl ... ables/4937
  • nornholdj
  • Novice
  • Novice
  • User avatar
  • Posts: 18

Post 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
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

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

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 17 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.