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.
Like I said, don’t export for ActionScript – it’s not necessary in your case.
You also need to assign a
Stringto the.textproperty, so you have do something like this ifscoreis aNumbertype:Do you get any errors, and is
scoreLabelwithin scope from your document class, or nested in another container?