更改 Flash 中符号上的文本

发布于 2024-07-14 11:30:34 字数 294 浏览 3 评论 0原文

我正在尝试通过让用户按一个指定符号来更改多个符号上的文本! 我不在乎它是使用 flash 2.0 还是 3.0,我做了一个菜单栏,并且想要更改符号上的文本(如果特别按下符号)! 我尝试了我能想到的一切,并期望它相当容易! 我肯定错过了什么 !

当用户按下符号时,会执行代码来更改所有其他按钮上的文本!

必须不止 my_symbol.text="我想要的文本";
是否有 sub_scene.scene.instance_name.text 或者我缺少的东西?

谢谢皮特

I'm trying to change the text on several symbols by having a user press one designated symbol ! I don't care if its with flash 2.0 or 3.0 , I did a menu bar and want to change the text on the symbols if on symbol in particular is pressed ! I tried everything I could think of and expected it to be fairly easy ! I must be missing something !

When a user presses a symbol code is executed to change the text on all the other buttons !

There must be more than my_symbol.text="text I want";
Is there a sub_scene.scene.instance_name.text or something I'm missing ?

Thanks

Pete

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别靠近我心 2024-07-21 11:30:34

问题很模糊,但在任何情况下您都需要定位文本字段而不是符号:

myMovieClip.myTextField.text = "Changed"

如果这不起作用,首先要检查的是容器的实例是否可以从脚本自己的范围访问:

trace(myMovieClip); 

The question is quite vague but you need to target the textField and not the symbol in any case:

myMovieClip.myTextField.text = "Changed"

If this is not working first thing to check is if the instance of the container is accessible from your scripts own scope :

trace(myMovieClip); 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文