Function!

I got some codes below:

interID= setInterval(demo,5000);
function demo(){
this.createEmptyMovieClip(“movie”,0);
movie._xscale = 100;
movie._yscale = 100;
movie._x = 75;
movie._y = 28;

 loadMovie("test.swf", "movie");

}

These scripts can be execute but it won’t wait for 5 seconds to run the script.Can anybody help me to solve it??

I’m not sure how to use setInterval, but this thread, Lost In Beta explains it. He put the setInterval after the function. Maybe that’s it. I’m not sure, I actually just learned how to use getTimer (as you will soon read):

http://www.kirupaforum.com/forums/showthread.php?threadid=24289&highlight=getTimer

Hope that helps!

Try this… (untested)

[AS]function demo() {
trace(“ran”);
_root.createEmptyMovieClip(“movie”, 0);
with (_root.movie) {
_xscale = 100;
_yscale = 100;
_x = 75;
_y = 28;
loadMovie(“test.swf”);
}
clearInterval(interID);
}
interID = setInterval(demo, 5000);[/AS]

[edit]oops, use 5000, not 1000[/edit]

Thanks for giving opinion.I’ll try it out!!

I edited my last post, I accidently wrote 1000 in the script when you wanted to use 5000. My apologies.