0
votes

I created a text area on my stage using the text tool, then converted it to a MovieClip symbol. I called it ScoreLabel and I clicked "Export for ActionScript". I named the instance of the text area scoreLabel. However, when I do this in my code:

scoreLabel.text = this.score;

it doesn't change. That line is in my Main.as file, which is the document class. How can I change the text shown in this text area using ActionScript? Maybe I need to import a library?

Thanks.

1

1 Answers

0
votes

Like I said, don't export for ActionScript - it's not necessary in your case.

You also need to assign a String to the .text property, so you have do something like this if score is a Number type:

scoreLabel.text = score.toString();

Do you get any errors, and is scoreLabel within scope from your document class, or nested in another container?