setInterval for movieclip?

How do u re-activate movieclip again n again with some interval.

Thanks in advance.

By re-activate do you mean play again, as in you want it to loop but with a delay?

V.

yes! you’ve made it more clear.
movie clip play with a delay.

Ok, lets say you want the movie to be delayed for 5 secs before it loops again. And you have a movie with an instance name myMovie_mc on the maintimeline.

Then put this in the last frame of your movie clip:

[AS]
stop();

function movieDelay() {
_root.myMovie_mc.gotoAndPlay(1);
}

setInterval(movieDelay, 5000);[/AS]

The 5000 means 5 seconds, but in milliseconds.
So 6 seconds in milliseconds would be 6000.

I dont know if that will work for definate cos i cant try it right now, so please let me know,

Regards,
Viru.

It rocks!
working perfectly!!!
Thanks Alot Viru.

Your welcome.

V.

I’ve been trying to learn the understanding of Variables and Arrays working with movieclips plus functions but somehow I couldn’t figure out how do u design or arrange your codes to make them work in proper hierarchy.How to use what and when.
My main concern is dealing with movieclip not generating numbers and stuff at the moment.Being a design background I feel for designer point of view if you Flash Gurus describe these variables, Arrays and fucntions n even prototype with mc_clip examples we designer could learn much faster and better.
let me put it in an equation [Variables+Arrays],[functions+Prototype] = with (movieclip);

I would be really greatful if you or somebody else could explain
above request in concern with controlling movieclips.

thanks.

I would start a new thread for this question alimirza.

great :slight_smile: