开发者

How to set attribute of instance with specified name defined on multiple frames

I have a tab button in a movieclip with 3 different states keyframed - popup, hover and up. I use the textfield on each state to show tab title - the problem is I开发者_Python百科 cannot use the same position for the textfield on each keyframe, so I keyframed the textfield's position. And in both keyframes for the textfield it has an instance name tabText. And when I assign text to it - it changes on one keyframe only. How should I resolve this situation without adding the textfield programmatically?


the only way to do this would be to add a variable that is containing the text and update the textfield with that every time you change keyframe. ideally you would avoid all of this and either use a static text for each frame or alternatively adjust the position programatically.

//initialising the variable, in frame one etc.
var content:String = "text in here";

// In every Keyframe
tabText.text = content;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜