# If a certain frame in an mc is playing

**URL:** <https://forum.kirupa.com/t/if-a-certain-frame-in-an-mc-is-playing/117692>\
**Category:** Uncategorized\
**Created:** [July 29, 2004, 1:31pm UTC](https://forum.kirupa.com/t/if-a-certain-frame-in-an-mc-is-playing/117692 "2004-07-29T13:31:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Insomniac](https://avatars.discourse-cdn.com/v4/letter/i/bb73d2/32.png) [@Insomniac](https://forum.kirupa.com/u/Insomniac)\
**Post date:** [July 29, 2004, 1:31pm UTC](https://forum.kirupa.com/t/if-a-certain-frame-in-an-mc-is-playing/117692/1 "2004-07-29T13:31:53Z")

</div>

Hey, I have seen how it is possible to use actionscript so that a certain action is played if a particular frame is playing: so that if a button is clicked in frame 7, a certain action happens, if the button is clicked in any other frame, something else happens. Well I’d like to do that for an mc: so that if the current frame of an mc = e.g. 7 then perform a particular action, if not, play a different action. Thanks to anyone who has a clue what I am talking about 😉

Insomniac

---

<div class="post-metadata">

**Author:** ![McGiver](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@McGiver](https://forum.kirupa.com/u/McGiver)\
**Post date:** [July 29, 2004, 1:58pm UTC](https://forum.kirupa.com/t/if-a-certain-frame-in-an-mc-is-playing/117692/2 "2004-07-29T13:58:27Z")

</div>

on (release) {  
if (this.\_currentframe == 7) {  
//some code  
} else if (this.\_currentframe == 8) {  
//some other code  
} else {  
//some other code  
}  
}

---

<div class="post-metadata">

**Author:** ![Insomniac](https://avatars.discourse-cdn.com/v4/letter/i/bb73d2/32.png) [@Insomniac](https://forum.kirupa.com/u/Insomniac)\
**Post date:** [July 29, 2004, 9:34pm UTC](https://forum.kirupa.com/t/if-a-certain-frame-in-an-mc-is-playing/117692/3 "2004-07-29T21:34:46Z")

</div>

That should do nicely, thanks 🙂
