# Need help with stop();

**URL:** <https://forum.kirupa.com/t/need-help-with-stop/315402>\
**Category:** Uncategorized\
**Created:** [October 25, 2010, 12:32pm UTC](https://forum.kirupa.com/t/need-help-with-stop/315402 "2010-10-25T12:32:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiwi79](https://avatars.discourse-cdn.com/v4/letter/k/e68b1a/32.png) [@kiwi79](https://forum.kirupa.com/u/kiwi79)\
**Post date:** [October 25, 2010, 12:32pm UTC](https://forum.kirupa.com/t/need-help-with-stop/315402/1 "2010-10-25T12:32:10Z")

</div>

I have a loop that replays on a random timer.  
Start of loop frame 1:  
function pause(){  
play();  
clearInterval(timer);}

then on frame 40:  
stop();

howlong = Math.random()\* 7500+4000;  
timer = setInterval(pause, howlong);

* * *

on the next scene i just want the frame to stop(); forever but it seems to play after waiting for the above designated timed pause.

when i remove the code above, stop(); works fine again. How can i get it to work aside my timed pause? anyway to reset it…?

ive tryed adding clearInterval(Timer); before the stop on scene 3 and its done nothing please help im goin mad
