# Game Timer AS2 CS3

**URL:** https://forum.kirupa.com/t/game-timer-as2-cs3/300938
**Category:** flash
**Created:** [December 1, 2009, 12:41am UTC](https://forum.kirupa.com/t/game-timer-as2-cs3/300938 "2009-12-01T00:41:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![megassy](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@megassy](https://forum.kirupa.com/u/megassy)
#### Post date: [December 1, 2009, 12:41am UTC](https://forum.kirupa.com/t/game-timer-as2-cs3/300938/1 "2009-12-01T00:41:28Z")

</div>

I’m getting a syntax error on this countdown timer. Any suggestions?

onClipEvent(load) {

seconds = 30;  
time = seconds;  
running = false;  
restart = function () {  
countdown = getTimer()+1000\*seconds;  
running = true;  
time = seconds;  
}  
}  
onClipEvent(enterFrame) {  
if (running) {  
if (time == 0) {  
running = false;  
\_root.play();  
} else {  
time=Math.round((countdown-getTimer())/1000);  
}  
}  
}
