开发者

Actionscript - Make TextArea component public and accessible

I want to make a TextArea component public so it can be accessed from other frames.

For example, I want to be able to say that if this button is pressed change the TextArea text to "1" and go to the frame.

I have no idea how to do this, i'开发者_开发百科ve tried :

frameHome.textArea.text = "1";

to change the text but it doesn't work so i'm presumming that i'm a little off mark. Any suggestions would be greatly appreciated!


If the button is in a frame where the TextArea is not currently added to the Stage, there will be no way to access this TextArea. You can add the TextArea on the same frame as the button. Set visible to false and in the button pressed event listener set the text and visible to true. then go to the desired frame.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜