Actionscript delay or pause

OK.

I need a function or some way to create a pause in between calls to a function and setInterval doesn’t seem to be working.

Basically, I have several movie clips in the library named movie1, movie2, etc… Each contains a fading movie clip. I want to attach them all using actionscript, but i want to wait like 5 secs in between each one and i can’t seem to get it to do that.

Here is the code i have so far without setInterval. It cause them all to appear on the screen at once.

var numOfEmployees = 4;
for (var i=1; i <= numOfEmployees; i++) {
var thisName = “movie” + i;
attachClip(thisName);
}

function attachClip(thisName){
thisMovie = _root.attachMovie(thisName, thisMovie + i, this.getNextHighestDepth())
thisMovie._x = 100;
thisMovie._y = (_root._height - thisMovie._height) - 100;
}

Now, this will make all movie clips appear on screen at the same time. What is the best way to create a 5 second delay between each call to attach clip? What is the proper way to use setInterval or is their a better way??

I need a solution that doesn’t use the timeline at all, possibly just a function that would work like this…
for (var i=1; i <= numOfEmployees; i++) {
var thisName = “movie” + i;
attachClip(thisName);
wait(5);
}

Anyone know of a function like that? Thanks.

Anyhelp would be greatly appreciated.