;

PDA

Click to See Complete Forum and Search --> : Dynamic Text for Score


rhermogeno
06-17-2008, 07:58 AM
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.

EgoAnt
06-17-2008, 10:50 AM
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:



dtShowScore.text = globalScore.toString();