Skip to main content
April 16, 2006
Question

Help refining this code, please?

  • April 16, 2006
  • 2 replies
  • 330 views
here's the code I'm working with:

stop();
b1.onRelease = test
function test (){
pauseI=setInterval(pauseF,1000);
function pauseF(){

_root.gotoAndStop(3);
clearInterval(pauseI);
_root.coverAll.gotoAndPlay(2);
}
}

Problem I have with this is that both the _root.gotoAndStop(3) and the coverAll.gotoAndPlay(2) both happen after the delay.

How do I set this up so that the coverAll.gotoAndPlay(2) happens IMMEDIATELY while the _root.gotoAndStop(3) waits the delay?
This topic has been closed for replies.

2 replies

kglad
Community Expert
Community Expert
April 10, 2023

locked

Participating Frequently
April 16, 2006
I think you need to take _root.coverAll.gotoAndPlay(2); out of your function pause function.
Maybe place it above pauseI=setInterval(pauseF,1000); and see if that works.