Return to Snippet

Revision: 25631
at April 3, 2010 21:31 by dada78


Initial Code
// setTimeOut Example
stop();
var timelineDelay:Number = 5; // Pause the TimeLine (in seconds)
function wait() {
play(); // Just continue playing
    // gotoandplay(50); // Play a specific frame or frame label
    // someFunction(); // Call a function
    // etc...
    trace("Timeline was delayed "+timelineDelay+" seconds, now continuing");
}
setTimeout(wait, timelineDelay*1000); // converts from milliseconds to seconds
// (1000 milliseconds = 1 second)

Initial URL


Initial Description
If you do not want to convert it to seconds and prefer to use milliseconds then you can use the following:
stop();
function wait() {
    play(); // Just continue playing
    // gotoandplay(50); // Play a specific frame or frame label
    // someFunction(); // Call a function
    // etc...
}
setTimeout(wait, 4500); // milliseconds

Initial Title
setTimeOut to delay functions

Initial Tags


Initial Language
ActionScript