Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

change text of a button

Guest
Dec 01, 2015 Dec 01, 2015

I wrote some text in the stage using the text tool, then I selected it and converted it to a symbol of type button, how can I change the text of this type of button? The Button name is btnBack, and if I double click it I can see that the name of the "text" is txtBack. I have tried the following:

btnBack.label = "test";

btnBack.text= "test";

btnBack["txtBack"] = "test";


btnBack.txtBack = "test";


btnBack.txtBack.text = "test";


But I cant change the text... How can I do it?



TOPICS
ActionScript
477
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 01, 2015 Dec 01, 2015

You can't change it.. it must be a movie clip not a button.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 02, 2015 Dec 02, 2015
LATEST

Unlike MovieClips, which are dynamic objects for which you can define your own properties and methods, SimpleButtons have only the limited properties and methods designated by the SimpleButton class.  Since they do not have a textField in their base class, there is no such property that you can target.  You could probably extend the base class and add such a textField, but it is easier to just use a MovieClip symbol instead.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines