# Listening the Event triggered by another class - Possible?

**URL:** <https://forum.kirupa.com/t/listening-the-event-triggered-by-another-class-possible/325439>\
**Category:** flash\
**Created:** [October 15, 2011, 8:29pm UTC](https://forum.kirupa.com/t/listening-the-event-triggered-by-another-class-possible/325439 "2011-10-15T20:29:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeeto](https://avatars.discourse-cdn.com/v4/letter/z/e274bd/32.png) [@zeeto](https://forum.kirupa.com/u/zeeto)\
**Post date:** [October 15, 2011, 8:29pm UTC](https://forum.kirupa.com/t/listening-the-event-triggered-by-another-class-possible/325439/1 "2011-10-15T20:29:09Z")

</div>

Hi guys, I’ve got a problem listening to the event.

I’ve got 3 classes:

```auto
package com.zeeto.swfaddress {

import flash.display.MovieClip;
import com.asual.swfaddress.*;

 public class SwfAddress extends MovieClip {

 private var dispatcher:Dispatch = new Dispatch;

 public function SwfAddress():void {
  SWFAddress.addEventListener(SWFAddressEvent.CHANGE, onChange);
 }

 private function onChange(e:SWFAddressEvent):void {
  dispatcher.changed();
 }
}
}

```

```auto
package com.zeeto.swfaddress {
 
 import flash.events.Event;
 import flash.events.EventDispatcher;
 
 public class Dispatch extends EventDispatcher {
  
  public static const CHANGED:String = "changed";
  
  public function changed ():void {
   
   dispatchEvent(new Event(Dispatch.CHANGED));
  }
 }
}

```

and…

```auto
package com.zeeto.menu {

import com.zeeto.swfaddress.*

public class MenuPanel extends MovieClip {
var swfRead:Dispatch = new Dispatch;

public function MenuPanel():void {
 swfRead.addEventListener(Dispatch.CHANGED, onChange);
}

private function onChange(e:Event):void {
 trace("Hello World");
}
}

```

And… it doesn’t work… is there any chance to listen to the EventDispatcher triggered by some other class?
