Thanks, I was able to get it to work by adding a timer complete event with the reset:
Code:var addTenPointsTimer:Timer=new Timer(500, 10); var currentScore = 0; score.text = "0"; function addTenPoints(event:TimerEvent):void{ currentScore++ trace("add point"); score.text = currentScore; } addTenPointsTimer.addEventListener(TimerEvent.TIMER, addTenPoints); function tenPointButton(e:MouseEvent):void{ addTenPointsTimer.start(); } tenButton.addEventListener(MouseEvent.CLICK, tenPointButton); addTenPointsTimer.addEventListener(TimerEvent.TIMER_COMPLETE, endAddTenPoints); function endAddTenPoints(e:TimerEvent):void{ addTenPointsTimer.reset(); trace("Timer is reset"); }




Reply With Quote