# Pause timer

**URL:** <https://forum.kirupa.com/t/pause-timer/129864>\
**Category:** Uncategorized\
**Created:** [November 29, 2004, 2:51pm UTC](https://forum.kirupa.com/t/pause-timer/129864 "2004-11-29T14:51:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![g5604](https://avatars.discourse-cdn.com/v4/letter/g/54ee81/32.png) [@g5604](https://forum.kirupa.com/u/g5604)\
**Post date:** [November 29, 2004, 2:51pm UTC](https://forum.kirupa.com/t/pause-timer/129864/1 "2004-11-29T14:51:25Z")

</div>

[font=verdana, arial, helvetica][size=2]Hi,

i have a countdown from 20 - 0, works great but i want to pause it. so heres what i did:

countdown.onEnterFrame = function() {  
if (!pause) {  
this.timer = int(20-(getTimer()-startTime)/1000);  
if (Number(this.timer) == 0) {  
gotoAndStop(10);  
}  
}  
};

b1.onPress = function() {  
pause=true;  
};  
b2.onPress = function() {  
pause=false;  
};

however, when i pause, the countdown stops but i think the timer keeps going as when i unpause it jumps down many seconds. Any ideas how to fix it?

cheers,  
G [/size][/font]
