# CS4, AS2, if currentframe action

**URL:** https://forum.kirupa.com/t/cs4-as2-if-currentframe-action/332125
**Category:** flash
**Created:** [February 8, 2014, 6:51pm UTC](https://forum.kirupa.com/t/cs4-as2-if-currentframe-action/332125 "2014-02-08T18:51:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dennisgaines](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@dennisgaines](https://forum.kirupa.com/u/dennisgaines)
#### Post date: [February 8, 2014, 6:51pm UTC](https://forum.kirupa.com/t/cs4-as2-if-currentframe-action/332125/1 "2014-02-08T18:51:26Z")

</div>

Spent days trying to figure something out along this line:

on (release){  
play();  
if (this.\_currentframe == 17){  
\_root.box.\_visible = true;  
}  
}  
Code is on a mc on main timeline. box is mc on main timeline.

---

<div class="post-metadata">

### Author: ![bbpanzu](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bbpanzu](https://forum.kirupa.com/u/bbpanzu)
#### Post date: [September 5, 2017, 2:20am UTC](https://forum.kirupa.com/t/cs4-as2-if-currentframe-action/332125/2 "2017-09-05T02:20:02Z")

</div>

on(release){ handlers are only for Button symbols. Not MC. try this

onClipEvent(enterFrame){  
onMouseUp = function(){  
play();  
if (this.\_currentframe == 17){  
root.box.visible = true;  
}  
}  
}
