0

I really need help (explanation) on using dynamic text in Flash. I get stuck when trying to display the current score on HUD in my game. I'm still new in Flash so any help would be appreciated.

J0e3gan
  • 8,740
  • 10
  • 53
  • 80

1 Answers1

0

Here is an example of current score displayed by the text field currentScore when someone clicks on the stage:

var p:int = 0; // score points

function clickHandler(e:MouseEvent):void {
    p++;
    currentScore.text = String(p);
}
stage.addEventListener(MouseEvent.MOUSE_DOWN, clickHandler);
helloflash
  • 2,457
  • 2
  • 15
  • 19