View Full Version : setInterval - Delay of LoadMovie
AmyDor
June 14th, 2003, 11:39 PM
:hair: I am trying to load a movie after a button is pressed. I can load the movie. I have since realized I need a delay.... I want to delay the playing of the movie, after the botton to load the is pressed.
HELP, plz :hair:
lostinbeta
June 14th, 2003, 11:57 PM
In the first frame of the movie you are loading...
function doneDelay(){
this.play();
clearInterval(delay);
}
delay = setInterval(doneDelay, 3000);
stop();
3000 is the time to delay in milliseconds, so 3000 is actually 3 seconds. After 3 seconds is up the doneDelay function is called on which plays the movie using the play() command and then it clears the interval so that in the next 3 seconds (or any after that :P) the function won't be called.
AmyDor
June 15th, 2003, 12:17 AM
Thanks for your help. FYI... I had to delete THIS. to have the script function correctly forme. It works!!!
Thanks a Mil
lostinbeta
June 15th, 2003, 12:20 AM
Oops, sorry, I typed it up on the spot... usually my untested code fails, you would think I would learn after the first 14000 times but NOOOOOO...lol.
Glad it works now though :)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.