定义自己的Event类:MyEvent
package com
{
import flash.events.Event;
import flash.events.EventDispatcher;
public class MyEvent extends Event
{
public static const EVENT_TEST:String = "EventTest";
public var data:Object;
public static const dis:EventDispatcher = new EventDispatcher();
public function MyEvent(type:String,bubbles:Boolean = false,canceable:Boolean = false,data:Object = null)
{
super(type,bubbles,canceable);
this.data = data;
}
}
}