# \[MX\]: button in movieclip

**URL:** <https://forum.kirupa.com/t/mx-button-in-movieclip/31114>\
**Category:** flash\
**Created:** [September 18, 2003, 12:51pm UTC](https://forum.kirupa.com/t/mx-button-in-movieclip/31114 "2003-09-18T12:51:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pect](https://avatars.discourse-cdn.com/v4/letter/p/dfb087/32.png) [@Pect](https://forum.kirupa.com/u/Pect)\
**Post date:** [September 18, 2003, 12:51pm UTC](https://forum.kirupa.com/t/mx-button-in-movieclip/31114/1 "2003-09-18T12:51:51Z")

</div>

#initclip

function slot(){}  
slot.prototype=new MovieClip();

slot.prototype.onPress = function (){  
trace(“testing”);   
}

Object.registerClass(“item”,slot);

#endinitclip

* * *

I have a button (with mouseOver states) inside a movieClip [item], after assigning the \<slot\> class to [item] and overwriting the movieclip’s onPress function, when ever the mouse rollover the button, it no longers displays the mouseOver state.

Any idea how I can overwrite the onPress function and have the mouseOver work at the same time?

Thanks (^.^;
