# Call a method outside its class

**URL:** <https://forum.kirupa.com/t/call-a-method-outside-its-class/229536>\
**Category:** Uncategorized\
**Created:** [June 18, 2007, 10:58am UTC](https://forum.kirupa.com/t/call-a-method-outside-its-class/229536 "2007-06-18T10:58:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oaki](https://avatars.discourse-cdn.com/v4/letter/o/7993a0/32.png) [@oaki](https://forum.kirupa.com/u/oaki)\
**Post date:** [June 18, 2007, 10:58am UTC](https://forum.kirupa.com/t/call-a-method-outside-its-class/229536/1 "2007-06-18T10:58:35Z")

</div>

Hi!

In AS2, i built my own EventDispatcher which was able to dispatch events in different classes. When I added an eventListener, the method needed 3 parameters: event, listenerObject, listener

now AS3 got its own EventDispatcher, however, when you add an EventListener, it only requires two arguments: event and a function. But what do I do when I need to call a function that is placed in a other class? Is there no way to call method of other classes with the EventDispatcher Class?

Thanks a lot!
