# Setting stopwatch to zero

**URL:** <https://forum.kirupa.com/t/setting-stopwatch-to-zero/223524>\
**Category:** flash\
**Created:** [April 23, 2007, 4:18pm UTC](https://forum.kirupa.com/t/setting-stopwatch-to-zero/223524 "2007-04-23T16:18:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![magjac](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@magjac](https://forum.kirupa.com/u/magjac)\
**Post date:** [April 23, 2007, 4:18pm UTC](https://forum.kirupa.com/t/setting-stopwatch-to-zero/223524/1 "2007-04-23T16:18:28Z")

</div>

Hi guys I am having a problem with my stopwatch, it starts at 04:00 seconds. This probally because of the timer script executing to early, so could anyone help me with a script that sets the timer to 00:00 without stoping it?

```auto
mcl = new Object();
mcl.onKeyUp = up;
function startTimer() {     
this.onEnterFrame = timern; 
} 

function stopTimer() { 
delete this.onEnterFrame; 
} 

function timern() {  
onEnterFrame = function () {
time = getTimer();
miliseconds = time;
minutes = Math.floor(miliseconds/1000/60);
miliseconds -= minutes*1000*60;
seconds = Math.floor(miliseconds/1000);
miliseconds -= seconds*1000;
miliRound = Math.round(miliseconds/10);
min = (minutes<10 ? "0" : "")+minutes;
sec = (seconds<10 ? "0" : "")+seconds;
ms = (miliRound<10 ? "0" : "")+miliRound;
textboxtid.text = min+":"+sec+":"+ms;
tid_txt.text = sec+":"+ms; //min+":"+sec+":"+ms;
};
} 

```
