Simple Events Aren't Working

I’m using Flash Pro 8 and I’m attempting to incorporate events into some of my classes and I’m having nothing but problems. After looking at lots of examples, this all seems okay, but doesn’t work. First is the class code and secondly is the code on the timeline.

ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#0066CC]import[/COLOR] mx.[COLOR=#006600]events[/COLOR].[COLOR=#006600]EventDispatcher[/COLOR];

[COLOR=#000000]class[/COLOR] iaicu.[COLOR=#006600]mycampus[/COLOR].[COLOR=#006600]ClassSchedule[/COLOR] [COLOR=#66CC66]{[/COLOR]
[COLOR=#0066CC]public[/COLOR] [COLOR=#000000]var[/COLOR] addEventListener:[COLOR=#000000]Function[/COLOR];
[COLOR=#0066CC]public[/COLOR] [COLOR=#000000]var[/COLOR] removeEventListener:[COLOR=#000000]Function[/COLOR];
[COLOR=#0066CC]public[/COLOR] [COLOR=#000000]var[/COLOR] dispatchEvent:[COLOR=#000000]Function[/COLOR];
[COLOR=#000000]function[/COLOR] ClassScheduleCOLOR=#66CC66[/COLOR] [COLOR=#66CC66]{[/COLOR]
EventDispatcher.[COLOR=#006600]initialize[/COLOR]COLOR=#66CC66[/COLOR];
[COLOR=#0066CC]this[/COLOR].[COLOR=#006600]dispatchEvent[/COLOR]COLOR=#66CC66[/COLOR];
[COLOR=#66CC66]}[/COLOR]
[COLOR=#66CC66]}[/COLOR]
[/LEFT]
[/FONT]

ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#0066CC]import[/COLOR] iaicu.[COLOR=#006600]mycampus[/COLOR].[COLOR=#006600]ClassSchedule[/COLOR];

[COLOR=#000000]var[/COLOR] mySchedule:ClassSchedule = [COLOR=#000000]new[/COLOR] ClassScheduleCOLOR=#66CC66[/COLOR];
[COLOR=#000000]var[/COLOR] myListener:[COLOR=#0066CC]Object[/COLOR] = [COLOR=#000000]new[/COLOR] [COLOR=#0066CC]Object[/COLOR]COLOR=#66CC66[/COLOR];
myListener.[COLOR=#006600]scheduleLoaded[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#66CC66[/COLOR] [COLOR=#66CC66]{[/COLOR]
[COLOR=#0066CC]trace[/COLOR][COLOR=#66CC66]([/COLOR][COLOR=#FF0000]“event heard”[/COLOR][COLOR=#66CC66])[/COLOR];
[COLOR=#66CC66]}[/COLOR];
mySchedule.[COLOR=#006600]addEventListener[/COLOR][COLOR=#66CC66]([/COLOR][COLOR=#FF0000]“scheduleLoaded”[/COLOR], myListener[COLOR=#66CC66])[/COLOR];
[/LEFT]
[/FONT]

Keep in mind that these classes are more elaborate, so events are intended to be more useful.

[QUOTE=medicated;1747119]Well, I found a “sort-of” sollution. After senocular brought to light the fact that I can’t actually attach listeners until an object is full created, I changed some things. I now call a load method in the constructor. The load method uses loadvars to load some external data. From there I used the Delegate class to create a loadvars.onLoad method that dispatches the event. It seems to work alright. Is there a better way to do this?[/QUOTE]
Perhaps you can help find a solution to the problem faced here:


import mx.utils.Delegate;
class PlayBack {
	private var target:MovieClip;
	private var depth:Number;
	/**
	        Callback function triggered when the playback has finished.
	        */
	public var onPlayBackComplete;
	//
	function PlayBack($target:MovieClip, $depth:Number) {
		//variable assignment.
		target = $target;
		depth = $depth;
		//
	}
	function clipToPlay() {
		target.createEmptyMovieClip("control", depth);
		target.control.onLoad = Delegate.create(this, loaded);
		// use MM's Delegate to force scope of onLoad event to this class
	}
	private function loaded():Void {
		trace("loaded");
	}
}



/**From Maintimeline**/
var t:PlayBack = new PlayBack(ball_mc, 1);
t.clipToPlay();

My attempts at getting this onLoad event to fire fails, have I misunderstood the function of Delegate?