# If a certain frame in an mc is playing

**URL:** <https://forum.kirupa.com/t/if-a-certain-frame-in-an-mc-is-playing/59229>\
**Category:** Uncategorized\
**Created:** [July 29, 2004, 1:31pm UTC](https://forum.kirupa.com/t/if-a-certain-frame-in-an-mc-is-playing/59229 "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/59229/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:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 29, 2004, 1:58pm UTC](https://forum.kirupa.com/t/if-a-certain-frame-in-an-mc-is-playing/59229/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:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 29, 2004, 9:34pm UTC](https://forum.kirupa.com/t/if-a-certain-frame-in-an-mc-is-playing/59229/3 "2004-07-29T21:34:46Z")

</div>

That should do nicely, thanks 🙂
