# Resetting timer

**URL:** <https://forum.kirupa.com/t/resetting-timer/259021>\
**Category:** flash\
**Created:** [April 30, 2008, 1:42pm UTC](https://forum.kirupa.com/t/resetting-timer/259021 "2008-04-30T13:42:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramamoorthi21](https://avatars.discourse-cdn.com/v4/letter/r/96bed5/32.png) [@ramamoorthi21](https://forum.kirupa.com/u/ramamoorthi21)\
**Post date:** [April 30, 2008, 1:42pm UTC](https://forum.kirupa.com/t/resetting-timer/259021/1 "2008-04-30T13:42:13Z")

</div>

Hi,

any one please help me with this,

i have 2 frames in my scene…

in the first frame i have added

[COLOR=Red]this.onEnterFrame = function()  
{  
var secs:Number = Math.floor(getTimer()%60000/1000);  
\_root.timer.text=(+secs+" “+“sec”+”");

if (secs\>15)  
{  
trace(“test”);  
delete this.onEnterFrame;  
\_root.gotoAndPlay(2)  
}  
[/COLOR]  
so the timer.text area will print the value from 0sec to 16 sec…

wat i needed is after 15 th sec the function should goto 2nd frame and the time should be reinitiated to 0sec and then should move upto 60sec

like

[COLOR=Blue]onEnterFrame = function()  
{  
var secsloop:Number = Math.floor(getTimer()%60000/1000);  
trace(secsloop);  
\_root.timer.text=(+secsloop+" “+“sec”+”");  
}

[COLOR=Black]but wat happens is the traced time looped from the end point 16…

if any one help me to fix this issue…that will be helpful

thanks in advance[/COLOR]  
[/COLOR]
