Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Delay several GoTo's

Status
Not open for further replies.

BurnettMarketing

Programmer
Aug 7, 2007
7
US
I would like to delay several goto's after so many seconds. Once at the first goto, it delays and goes to the next frame indicated. I am using the following code for the first goto but nothing happens at frame 2. It doesn't continue to goto the next frame as indicated. Thanks in advance for your help.

ON FRAME 1
stop();
startTime = getTimer();
this.onEnterFrame = function () {
currentTime = getTimer();
if (currentTime-startTime>139000) {
gotoAndPlay(2);
}
}

ON FRAME 2
stop();
startTime = getTimer();
this.onEnterFrame = function () {
currentTime = getTimer();
if (currentTime-startTime>169000) {
gotoAndPlay(3);
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top