# Hint for dispatching an event which is listened by all

**URL:** <https://forum.kirupa.com/t/hint-for-dispatching-an-event-which-is-listened-by-all/309862>\
**Category:** flash\
**Created:** [May 26, 2010, 11:17am UTC](https://forum.kirupa.com/t/hint-for-dispatching-an-event-which-is-listened-by-all/309862 "2010-05-26T11:17:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![laaptu](https://avatars.discourse-cdn.com/v4/letter/l/76d3ee/32.png) [@laaptu](https://forum.kirupa.com/u/laaptu)\
**Post date:** [May 26, 2010, 11:17am UTC](https://forum.kirupa.com/t/hint-for-dispatching-an-event-which-is-listened-by-all/309862/1 "2010-05-26T11:17:15Z")

</div>

May be my title doesn’t clearly reflect to what I am saying.  
Let me demonstrate with following example

```php

//l have a Class named MyClass where have dispatched an event like
dispatchEvent(new Event("firstDispatch"));

```

Now there is another class which adds object of MyClass

```php
    
//lets say it be MyClass1 where I have following process
public var myClass:MyClass = new MyClass();
this.addChild(myClass);

```

Now here is the final class which holds object of MyClass1

```php
    
var newClass:MyClass1 = new MyClass1();
//now in order to listen to event dispatched at MyClass I have to do
newClass.myClass.addEventListener("firstDispatch",doSomething);
 

```

Instead of doing this type of event listening,is there a way, by which the final class can listen to “firstDispatch” event without going through its object as shown above
