HELP! with wait Function setInterval

FYI: I am really, really new to action script.

I have a movie clip symbol that is place on my main time line. I want the movie clip to display frames for (x) seconds then go to the next frame. I have a chunk of code that works by itself but when placed into my flash site it is causing some strange problems. Such as navigating to a label (page) prior to the movie clip that has the wait function code, freezes the flash. I am wondering if I need _root or a this in there somewhere.

The reason I want to do this is so I don’t have to add a bunch of frames to get the pause time I need.

Is there a way to use the code below and not have it cause problems with the rest of my time line?

Here is the wait function code

i = 1;
function Wait() {
if (i == 7) {
} else {
// or whatever script you would like…
// clearInterval(WaitInt); // to use the interval only once
WaitInt = setInterval(Wait, 5000);
// change to 5000 for 5 sec…

Here is a link where I downloaded the sample code

Thanks for any help. :slight_smile: