# Playing an MC randomly

**URL:** <https://forum.kirupa.com/t/playing-an-mc-randomly/17714>\
**Category:** Uncategorized\
**Created:** [April 8, 2003, 2:35pm UTC](https://forum.kirupa.com/t/playing-an-mc-randomly/17714 "2003-04-08T14:35:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![elietabet](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@elietabet](https://forum.kirupa.com/u/elietabet)\
**Post date:** [April 8, 2003, 2:35pm UTC](https://forum.kirupa.com/t/playing-an-mc-randomly/17714/1 "2003-04-08T14:35:30Z")

</div>

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 ??

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 8, 2003, 2:38pm UTC](https://forum.kirupa.com/t/playing-an-mc-randomly/17714/2 "2003-04-08T14:38:49Z")

</div>

Hi elietabet

what does this have to do with playing mc randomly? 🙂

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 8, 2003, 2:53pm UTC](https://forum.kirupa.com/t/playing-an-mc-randomly/17714/3 "2003-04-08T14:53:22Z")

</div>

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. 😉 =)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 8, 2003, 3:19pm UTC](https://forum.kirupa.com/t/playing-an-mc-randomly/17714/4 "2003-04-08T15:19:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 8, 2003, 3:24pm UTC](https://forum.kirupa.com/t/playing-an-mc-randomly/17714/5 "2003-04-08T15:24:56Z")

</div>

> _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.**

😛 now i feel stupid 😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 9, 2003, 9:14am UTC](https://forum.kirupa.com/t/playing-an-mc-randomly/17714/6 "2003-04-09T09:14:40Z")

</div>

dammit … guys i got confused after my search

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 9, 2003, 9:19am UTC](https://forum.kirupa.com/t/playing-an-mc-randomly/17714/7 "2003-04-09T09:19:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 9, 2003, 11:05am UTC](https://forum.kirupa.com/t/playing-an-mc-randomly/17714/8 "2003-04-09T11:05:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 9, 2003, 11:15am UTC](https://forum.kirupa.com/t/playing-an-mc-randomly/17714/9 "2003-04-09T11:15:01Z")

</div>

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

```

that’s the idea… 😉
