# AS2 Event Listening Between Classes

**URL:** https://forum.kirupa.com/t/as2-event-listening-between-classes/292170
**Category:** flash
**Created:** [July 10, 2009, 8:49pm UTC](https://forum.kirupa.com/t/as2-event-listening-between-classes/292170 "2009-07-10T20:49:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![spastic](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@spastic](https://forum.kirupa.com/u/spastic)
#### Post date: [July 10, 2009, 8:49pm UTC](https://forum.kirupa.com/t/as2-event-listening-between-classes/292170/1 "2009-07-10T20:49:41Z")

</div>

Hello,

I am an AS3 coder, but I’ve been given project that needs to be done in AS2, and am having trouble understanding the events model. Inside my controller movie clip, I have a draggable movie clip that dispatches an event when it reaches a point. I cannot for the life of me figure out how to get my controller to properly listen to the event. I have no idea what I am doing wrong—Please help!!! I have attached my files.

The dragger dispatches the event as follows:

```auto

var eventObject:Object = {target:this, type:'Snapped'};
dispatchEvent(eventObject);

```

Controller script–the complete handler never executes

```auto
import mx.events.EventDispatcher;
import mx.utils.Delegate;

class labelController extends MovieClip {
	
	public var dragClip;
	
	
	
	function dispatchEvent() {
	}
	function addEventListener() {
	}
	function removeEventListener() {
	}
	//initialize
	function labelController() {
		
		dragClip.addEventListener('Snapped', Delegate.create(this, completeHandler));
		
	}
	
	
	
	function completeHandler(eventObject:Object):Void
	{
		trace("completehandler");
	}
	
	
}

```
