-
Dynamic Text for Score
I just need to know how can I display the score of my game in the game screen area using a dynamic text in AS3. It was easy in AS2 but I need to learn how to do it in AS3.
The score variable is named as globalScore
Any coding samples will be appreciated very much. Thanks.
-
The simple answer is that you can add a text field to the stage and make it dynamic. Below the Dynamic Text selector is a field called "<Instance Name>", I set that to dtShowScore. Then, to change the text on the text field use:
Code:
dtShowScore.text = globalScore.toString();