 		
 		public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
 		{
+			listeners ||= {};
 			var funcs:Array = listeners[type] = listeners[type] || [];
 			var i:Object = funcs.indexOf(listener);
 			if (i != -1)

		
		private function dispatchEventFunction(event:Event):Boolean
		{
			event.target = this;
			event.currentTarget = this;
			var funcs:Array = listeners[event.type];

	[Event(name = "activate", type = "flash.events.Event")]
	public class EventDispatcher extends Object implements IEventDispatcher
	{
		private var listeners:Object;
		
		public function EventDispatcher(target:IEventDispatcher = null)
		{
