Playing an MC randomly

how can i make an MC, that has a basic animation, to play after a constant amount of time. for example, i want it to play each 15 seconds.

anyone got a clue ??

Hi elietabet

what does this have to do with playing mc randomly? :slight_smile:

what you’re looking for is setInterval()… you will basically tell it to wait 15 seconds and play, etc. etc…

On my way to the office, I’ll try to put an example up; that is, if you have not figured it out by then.

Have a great day.

sorry montoya. :-
but it’s easier with setInterval.

you should run a search in the forum elietabet. there are several posts about this. of course, maybe not exactly what you want, but you’ll learn how to use it. :wink: =)

Kax… you’re right! I actually typed the wrong command. So much so, that my first reaction was …" Kax, that is what I typed!" heheh… oh well.

As a matter of fact, I have responded to this question before using setInterval. That is what I get for doing conference calls and answering mail…

Thanks for the correction. I will fix the post.

Originally posted by Iammontoya
what you’re looking for is setInterval()… you will basically tell it to wait 15 seconds and play, etc. etc…

Originally posted by kax
sorry montoya. :-
but it’s easier with setInterval.

:stuck_out_tongue: now i feel stupid :stuck_out_tongue:

dammit … guys i got confused after my search

what seems to be the problem? code? fla? something? =)

no nothing, it is just i can’t seem to figure out how to play it after a specific period of time.
i have the MC added to main timeline and i want it to play after each 15 secs.

playMovieClip = function() {
myMovieClip.play();
}
setInterval(playMovieClip, 15000);

that’s the idea… :wink: