# Playing MovieClips One by One

**URL:** <https://forum.kirupa.com/t/playing-movieclips-one-by-one/66038>\
**Category:** flash\
**Created:** [October 1, 2004, 7:52pm UTC](https://forum.kirupa.com/t/playing-movieclips-one-by-one/66038 "2004-10-01T19:52:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChaoticGood](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@ChaoticGood](https://forum.kirupa.com/u/ChaoticGood)\
**Post date:** [October 1, 2004, 7:52pm UTC](https://forum.kirupa.com/t/playing-movieclips-one-by-one/66038/1 "2004-10-01T19:52:42Z")

</div>

Hello,

I am trying to play a couple of movie clips one after the other one. In other words, I would like movie clip A to run and execute the AS attached, then I would like movie clip B to run and execute the AS attached to it.

Can anyone help me with how to get a movie to play and execute AS on one movie, then the next, then the next?

Thanks,  
ChaoticGood

---

<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:** [October 2, 2004, 5:29pm UTC](https://forum.kirupa.com/t/playing-movieclips-one-by-one/66038/2 "2004-10-02T17:29:51Z")

</div>

okay on the last frame of mvclip A put “mclipB.gotoAndPlay();” ok same thing for mvclipB.  
Frames can have other code too but thats all you asked so… hope i was help. (Nice little DND name lol)

---

<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:** [October 2, 2004, 10:13pm UTC](https://forum.kirupa.com/t/playing-movieclips-one-by-one/66038/3 "2004-10-02T22:13:52Z")

</div>

Thanks for the help, Brandon?

Will what you suggested work with movieclips that are created with AS (in other words, no timeline)? I am controlling the animation using actionscript, so I don’t really have frames for the movieclip.

Best,  
CG

PS - name was given to me by some friends, but didn’t know it was a DnD thing…😉

---

<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:** [October 3, 2004, 2:54am UTC](https://forum.kirupa.com/t/playing-movieclips-one-by-one/66038/4 "2004-10-03T02:54:15Z")

</div>

You’ll have to explain what you’re trying to do a little more.

You can try setInterval(function, milliseconds) and have the function keep track of the next MC to play, and play it after the time to say has ended. Or you could have it keep track of the time by frames.

---

<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:** [October 3, 2004, 3:34am UTC](https://forum.kirupa.com/t/playing-movieclips-one-by-one/66038/5 "2004-10-03T03:34:21Z")

</div>

I dont have time but here this should work sry for no code box hope i could help. just put it on the MVClip

onClipEvent (enterFrame) {  
//Tests what movie its counting so if the movie was a it would count to 200.  
if (\_root.movie == “a”) {  
\_root.number = \_root.number += 1;  
//Tells it to play when it hits total frames of 200.  
if (\_root.number == “200”) {  
Movieclip.gotoAndPlay(1);  
\_root.number = 0  
\_root.movie == “b”  
}  
}  
if (\_root.movie == “b”) {  
\_root.number = \_root.number += 1;  
//Tells it to play when it hits total frames of 300.  
if (\_root.number == “300”) {  
Movieclip.gotoAndPlay(1);  
\_root.number = 0  
\_root.movie == “c”  
}  
}  
//Tests what movie its counting so if the movie was a it would count to 200.  
if (\_root.movie == “c”) {  
//do nothing its done  
}  
}
