Hi,
I need a script for a frame:
How do I pause a frame for 6 seconds and then continues to play ?.
thx
Hi,
I need a script for a frame:
How do I pause a frame for 6 seconds and then continues to play ?.
thx
the best way is to use the setInterval command. here is an example
function playclip(){
_root.play();
clearInterval(delay);
}
delay = setInterval(playclip,6000);
stop();
first we create a function with the play command and clearInterval command which I will explain later. The function is named playclip.
next we set a variable “delay” equal to our setInterval command.
The set Interval command is:
setInterval(function to execute, time to delay in milliseconds);
it is actually a loop command that executes a command every so many milliseconds. however in the function there is a clearInterval command pointing to the delay variable, this will get rid of the setInterval command after the first time it executes.
I tried using this script in a movie loaded into a blank clip of another movie.
The script fuctioned perfectly when the movie is run on its own, but when it is loaded into the other movie’s blank clip, it will cause all movies subsequently loaded into that blank clip to begin looping with the same pause time between loops.
The script at http://www.kirupaforum.com/showthread.php?s=&threadid=8919&highlight=pause+script does the same thing, but does not cause the “interference” on subsequent movies.
it’s because you are targeting the root and telling that to play, take the _root. off of the play command and see if that fixes your problems.
That was the first thing I did, but it didn’t make a difference.
:: Copyright KIRUPA 2024 //--