change text of a button

Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
You can't change it.. it must be a movie clip not a button.
Copy link to clipboard
Copied
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.

