# Reset Function

**URL:** <https://forum.kirupa.com/t/reset-function/15472>\
**Category:** flash\
**Created:** [March 14, 2003, 4:12pm UTC](https://forum.kirupa.com/t/reset-function/15472 "2003-03-14T16:12:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BullDog\_Flash](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@BullDog\_Flash](https://forum.kirupa.com/u/BullDog_Flash)\
**Post date:** [March 14, 2003, 4:12pm UTC](https://forum.kirupa.com/t/reset-function/15472/1 "2003-03-14T16:12:07Z")

</div>

Here is my code for my Timer.

onClipEvent (load) {  
start = getTimer();  
startCount = 60;  
}  
onClipEvent (enterFrame) {  
current = (getTimer()-start)/300;  
if (current\<startCount) {  
elapsed = startCount-current;  
bCounter = Math.floor(elapsed);  
} else {  
\_root.speed += 10;  
\_root.score += 10;  
}  
}

It’s a typical timer now see the last two picces of code that makes my speed and score go up but i dont want it to go up and keep going i just want to add 10 to both i figured in order to stop it i need it to reset.

So anyone know how i can make a rest function i never used it before jus heard of it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 14, 2003, 4:51pm UTC](https://forum.kirupa.com/t/reset-function/15472/2 "2003-03-14T16:51:08Z")

</div>

Please someone
