Jump to content


Variable within Graphic within Movie Clip


  • You cannot reply to this topic
2 replies to this topic

#1 Blue_Monkey

    Young Padawan

  • Members
  • Pip
  • 11 posts

Posted 17 January 2008 - 10:48 PM

In order to save time and space, I want to create one movie clip that changes it's dynamic text with each frame. Actually, it is dynamic text with a graphic within a movie clip (in order to animate the graphic as a single object). I know that to change dynamic text on the root level I would use:

var anyvar = "text";

However, I cannot figure out how to change this text.
I tried changing the code to var transbox1.transboxg1.trans1 = "text"; (instance names with variable at the end) but that does not work.
How would I have to write this code in order for this dynamic text to be changed?
(In order to make it simpler: use "mc" as the movieclip instance name, "g" as the graphic's instance name, and "variable" as the variable name). Thanks in advance to anyone who can help me out.

Edited by Blue_Monkey, 18 January 2008 - 06:00 PM.


#2 flamereaper

    Young Padawan

  • Members
  • Pip
  • 65 posts
  • Gender:Male
  • Location:UK

Posted 18 January 2008 - 04:00 AM

well if it wont work when you do it that way then the one thing that i can sugest is dont use the variable name, instead target the dynamic text box directly.

Firsat give it an instance name (for ease ill use myText_txt);

mc.g.myText_txt.text = "new value here";

that should do it.

#3 Blue_Monkey

    Young Padawan

  • Members
  • Pip
  • 11 posts

Posted 18 January 2008 - 05:54 PM

Oh, I figured it out. The graphic doesn't count as part of the sequence, so it would just be:
mc.myText_txt.text = "new value here"
Thanks, that saves me a huge amount of time.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users