Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic text question 1

Status
Not open for further replies.

Flashoid

Technical User
Dec 11, 2002
163
US
Hello -

I have a dynamic text scroller that only works if I have everything on the main timeline. I am trying to create a movieclip (moving all the same code that was on the main timeline into a MC) but once I do that the dynamic text no longer displays. I have tried adding "../" variations since I moved it down a level into a MC but with no luck.

Here's what I have:

A movieclip labeled Scroller which contains all the code. Movieclip Scroller is on the stage in the main timeline.

Layer 1 Actions for Scroller MC:
loadVariablesNum("/text01.txt", 0);

Layer 2: Graphic Instance with Dynamic text field inside of it. Dynamic text field name: scroller, variable name: text1.


I have tried variations of this but with no luck, I get Error URL.

loadVariablesNum("/text01.txt", 0);
loadVariablesNum("./text01.txt", 0);
loadVariablesNum("../text01.txt", 0);


thanks!


 
You should really be using the LoadVars Object, rather than loadVariablesNum...

But if you insist in using it, you should use the usual...

loadVariablesNum("text01.txt", 0);

...Which load the variables on the main timeline...

Now from any however deeply nested textfield, you simply have to reference those main timeline variables, by adding _level0 to your variable's name in the Var textbox of your textfield.
If your Var box variable's name was myText, make it _level0.myText instead, and it should then work fine.



Regards. FLASH HELP - OPENED FOR BUSINESS!
TO GET YOUR OWN FREE WEBSITE HOSTING
 
Oldnewbie -

I added the _level0 to the var box like you described and it works great.

Thanks!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top