# Scope of dispatchEvent

**URL:** https://forum.kirupa.com/t/scope-of-dispatchevent/223330
**Category:** Uncategorized
**Created:** [April 21, 2007, 9:48am UTC](https://forum.kirupa.com/t/scope-of-dispatchevent/223330 "2007-04-21T09:48:34Z")
**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: [April 21, 2007, 9:48am UTC](https://forum.kirupa.com/t/scope-of-dispatchevent/223330/1 "2007-04-21T09:48:34Z")

</div>

Hi,

I’ve got three classes. Break - Animation - Broadcaster.  
Break extends Animation extends Broadcaster.

So what I want to do now is to start a tween in the Animation Class. When the tween is done, I dispatch an event called “endTween”, and have the Break class listening to it in order to call a function in that class.

Stupidly enough it only works if I call the addEventListener() method from the Animation class. But as soon as I try that from the Break class (where I actually want to add the EventListener) it doesn’t work anymore.

Has anybody an idea how I could solve this problem?
