• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Help refining this code, please?

Guest
Apr 15, 2006 Apr 15, 2006

Copy link to clipboard

Copied

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?
TOPICS
ActionScript

Views

302

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 16, 2006 Apr 16, 2006

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 10, 2023 Apr 10, 2023

Copy link to clipboard

Copied

LATEST

locked

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines