# Play different movie clip at a given fame on the main timeline

**URL:** <https://forum.kirupa.com/t/play-different-movie-clip-at-a-given-fame-on-the-main-timeline/20995>\
**Category:** flash\
**Created:** [May 15, 2003, 3:47pm UTC](https://forum.kirupa.com/t/play-different-movie-clip-at-a-given-fame-on-the-main-timeline/20995 "2003-05-15T15:47:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwang\_autoskill](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@jwang\_autoskill](https://forum.kirupa.com/u/jwang_autoskill)\
**Post date:** [May 15, 2003, 3:47pm UTC](https://forum.kirupa.com/t/play-different-movie-clip-at-a-given-fame-on-the-main-timeline/20995/1 "2003-05-15T15:47:30Z")

</div>

I need to play different movie clip at a given frame, let’s say 100, in the main timeline. For example,  
if(\_root.x==1) play movieClip1;  
else if(\_root.x == 2) play movieClip2;  
else if(\_root.x == 3) play movieClip3;

How can I do it?

Thanks

James

---

<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:** [May 15, 2003, 9:00pm UTC](https://forum.kirupa.com/t/play-different-movie-clip-at-a-given-fame-on-the-main-timeline/20995/2 "2003-05-15T21:00:48Z")

</div>

You could use something like this:

```auto

onClipEvent(enterFrame){
if(_root.currentframe == 25)
mc25.play();
else if(_root.currentframe == 26)
mc26.play();

```

Hope that helps 🙂
