Delay a command

on (release) {
play();
loadMovie(“linkpool/art.swf”, “content”);
}

I am doing this. However, i want
loadMovie(“linkpool/art.swf”, “content”);
only to work 50 frames after the user has click the button.

Not sure of the setup, but why don’t you just add the loadMovie() code on the frame 50 frames after the user clicks the button.

Either that or check out setInterval() to delay it for a set amount of milliseconds.

how do you use setInterval() ??

In this case, it would be something like… [AS]function loadIn(movie) {
containerClip.loadMovie(movie);
clearInterval(loadInterval);
}
loadInterval = setInterval(loadIn, 1000, “file.swf”);[/AS] (untested) where loadIn is the function that will get run, containerClip is the instance name of the movieclip you are loading to, 1000 is the amount of milliseconds (1 second) to delay before running the function, loadInterval is the intervalID, and file.swf is the file you are loading.

For more information on loadInterval and clearInterval check your local Actionscript Reference (Window/Reference in Flash)

WOW IT WORKS! thanks a million. everything for my site is coming into place!

Glad to hear that :slight_smile: