Dynamic text in nested MCs

  • monsieur_le_christophe
  • Student
  • Student
  • monsieur_le_christophe
  • Posts: 71
  • Loc: Wales, UK

Post 3+ Months Ago

I have a dynamic text box in a MC which is within another MC. I've been able to get dynamic text to show when the textbox is in a MC which is in _root, by setting the variable which the textbox is looking for to be _root.news as opposed to just news, but for some reason this stops working once the texbox's MC is nested inside another.

The loadVariablesNum action is in a frame in _root and reads as follows:

loadVariablesNum("news.txt", 0);

Does anyone know why this occurs? Is it to do with levels? I don't really understand their significance...

Thanks a lot,
Chris
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

Since it is nested inside of another mC you have to include the instanceName of that new MC in your path as well.

If _root.news[b] works with the original mC then your path will look along the lines of, [b]_root.NewMcInstanceName.news when it's nested in NewMcInstanceName.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

As for _levels, they are alot like floors of an appartment building. If you have a text file with &bathroomWidth=10&bathroomLength=10

Loading that with loadVariablesNum(url,level [,method]) will target bathroomWidth & bathroomLength on the level/floor specified.

Personally I find levels to be a pain, I like to use named movieClips that are all in level0 & target acordingly using _global when needed.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 4 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.