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:
var eventObject:Object = {target:this, type:'Snapped'};
dispatchEvent(eventObject);
Controller script–the complete handler never executes
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");
}
}