1
votes

I'm using ActionScript 2.0 and I do not have control of dynamic text inside movie clips. I have a movie clip named 'Glass' and dynamic text named 'Glass_ID' I want Glass_ID Value become Glass_ID01 when clicked the button named 'btn' but it doesn's work how to i'm solve it?

on(press){this.Glass.Glass_ID.text ="Glass_ID01"}
1
Is the button inside the movieclip?user1094081
No. button and movieclip in same layer박정호
So, you can't use "this", try _root or _level0 (or the level you're in)user1094081
Like this? on (press) { _level0..Glass.Glass_ID.text = "Glass_ID01"; } or on (press) { _root..Glass.Glass_ID.text = "Glass_ID01"; }박정호
oh. thank you. it's working!박정호

1 Answers

0
votes

If "Glass" is not inside the button this won't work, you must set the correct path, eg.

on(press){_level0.Glass.Glass_ID.text ="Glass_ID01"}

or from the timeline:

btn.onPress = function(){
   _level0.Glass.Glass_ID.text ="Glass_ID01"
}

(of course, you should change that _level0 with _root or a container movieclip, whatever applies to your situation).

Disclaimer: last time I used Flash it was 2011! :-)