# Call an event handler function with out useing eventListener?

**URL:** <https://forum.kirupa.com/t/call-an-event-handler-function-with-out-useing-eventlistener/322045>\
**Category:** Uncategorized\
**Created:** [May 8, 2011, 10:26pm UTC](https://forum.kirupa.com/t/call-an-event-handler-function-with-out-useing-eventlistener/322045 "2011-05-08T22:26:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bonassus](https://avatars.discourse-cdn.com/v4/letter/b/ea5d25/32.png) [@bonassus](https://forum.kirupa.com/u/bonassus)\
**Post date:** [May 8, 2011, 10:26pm UTC](https://forum.kirupa.com/t/call-an-event-handler-function-with-out-useing-eventlistener/322045/1 "2011-05-08T22:26:12Z")

</div>

I want to call the same event handler function with a click and also with a custom event. the problem is the event type that needs to be passed to the function. Is there are generic event type that can be used to call the function from both places?

```auto
menuBtn.addEventListener(MouseEvent.CLICK, menuOpen );

function menuOpen(event:MouseEvent){
trace("yes");
}

function otherFunction(e:CustomEventClass){
menuOpen();
}

```
