# Trouble w/BTN nested in MC

**URL:** <https://forum.kirupa.com/t/trouble-w-btn-nested-in-mc/107260>\
**Category:** Uncategorized\
**Created:** [April 13, 2004, 7:53pm UTC](https://forum.kirupa.com/t/trouble-w-btn-nested-in-mc/107260 "2004-04-13T19:53:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pspecial](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pspecial](https://forum.kirupa.com/u/pspecial)\
**Post date:** [April 13, 2004, 7:53pm UTC](https://forum.kirupa.com/t/trouble-w-btn-nested-in-mc/107260/1 "2004-04-13T19:53:57Z")

</div>

How can I get a button to work when its nested in a MC that has an onEnterFrame with a onPress command targeted to it??

Here’s the code for my “popup” MC located on the main timeline.

popup.onEnterFrame = function(){  
this.onPress = function() {  
this.startDrag(false);  
}  
this.onRelease = function() {  
this.stopDrag();  
}  
}

Within that same MC is a button that tells it to close. However, I run a trace command to it and nothing happens. It seems like the onPress nested in the onEnterFrame is over-riding my button on(press).

How can I work around this?
