简体   繁体   English

闪光灯按钮符号中的文本立即全部更改(动作脚本2)

[英]Text in flash button symbols all change at once (Actionscript 2)

I have reached an impass which means I have to spend many hours doing something in a very tedious way because I can't work out a way to do it quickly, here is my problem. 我已经陷入僵局,这意味着我不得不花很多时间以一种非常乏味的方式做某件事,因为我无法找到一种快速完成某件事的方法,这就是我的问题。

In flash if I make a button that consists of a rectangle and a text field then make it all a button symbol, if I then copy the symbol to multiple instances on screen and change the text in one of them, it changes in all of them because I am changing the symbol. 在Flash中,如果我制作一个由矩形和文本字段组成的按钮,则将其全部设为按钮符号,如果我随后将该符号复制到屏幕上的多个实例并更改其中一个的文本,则所有这些都将更改因为我正在更改符号。

How can I overcome this, perhaps with actionscript? 我该如何克服这个问题,也许使用动作脚本? I tried writing. 我尝试写作。 button1.text1.text = "test change button text"; button1.text1.text =“测试更改按钮文本”; on the main canvas (and giving one button a name of button one and the text field within it text1) but it doesn't work. 在主画布上(并给一个按钮一个按钮的名称以及其中的文本字段text1),但是它不起作用。

The only thing I found that works was to make multiple symbol copies of the button but then if I want to change the colour or dimensions of all the buttons it takes ages. 我发现唯一可行的方法是制作按钮的多个符号副本,但是如果我想更改所有按钮的颜色或尺寸,则需要花费很多时间。

Is there a better way? 有没有更好的办法? Using actionscript 2 perhaps, or just some property of the button to allow individual text? 也许使用actionscript 2,还是仅使用按钮的某些属性来允许单个文本?

I attempted your situation... and I didn't run into your problem. 我尝试过您的情况...但我没有遇到您的问题。 Text boxes are individual values, provided that the text box is dynamic or input 文本框是单个值,前提是文本框是动态的或输入的

I think that what may solve your problem is checking what kind of text boxes you are working with. 我认为可以解决您的问题的方法是检查正在使用的文本框。 Look in the properties panel; 在属性面板中查看; does it say "dynamic"? 它说“动态”吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM