Need help with stop();

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