# Is this possible?

**URL:** <https://forum.kirupa.com/t/is-this-possible/245447>\
**Category:** Uncategorized\
**Created:** [November 29, 2007, 7:43pm UTC](https://forum.kirupa.com/t/is-this-possible/245447 "2007-11-29T19:43:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wormix](https://avatars.discourse-cdn.com/v4/letter/w/7993a0/32.png) [@wormix](https://forum.kirupa.com/u/wormix)\
**Post date:** [November 29, 2007, 7:43pm UTC](https://forum.kirupa.com/t/is-this-possible/245447/1 "2007-11-29T19:43:48Z")

</div>

Hello,  
Here’s what I want to do: I have a class that extends the MovieClip class. In my class the onRollOver event has a certain handler function defined. Now if a user defines his own onRollOver handler for a symbol associated with my class I don’t want my handler function to be overwritten. Instead, when the event is triggerd, I want it to execute the user’s handler and my handler too. I had a few ideas but none of them worked. Thanks in advanced. Here’s how the code looks like:

MyClass.as

class MyClass extends MovieClip{

…

public function onRollOver(){  
trace(“action1”);  
}  
}

in the first frame of my .fla i have a symbol btn\_mc who is associated in the Library with MyClass, and the action for it is:

btn\_mc.onRollOver = function(){  
trace(“action2”);  
}

…now, when i run the movie , if a roll over that button i want both messages to be shown in the trace panel, it doesn’t matter the order. In my example only “action2” string is displayed. Hope I made my self pretty clear.

P.S. : Using hitTest to detect if the mouse is over my button, in MyClass is not an option for me. I want the power of the onRollOver event
