I'm using Flash Pro CS6 to make an easy game where some cubes drop. I added a text field (instance name is timerText) where I wat the time to display. Here is the code:
var time:int =0;
var timer:Timer = new Timer(1000,0);
timer.start();
timer.addEventListener(TimerEvent.TIMER, cubeFall);
function cubeFall(t:TimerEvent) {
time++;
timerText.text = time.toString();
if (time == 3) {
cube_1.play();
}
}
My problem is that the text field, when the game starts, after 1 second the number 1 appears, but it doesn't continue. Any Ideas why?