as3自定义事件

时间:2023-03-10 07:33:45
as3自定义事件
 package EventPackage
{
import flash.events.Event; /**
*
* @author tqr <br />
* 创建时间:2015-2-6 下午5:55:49
*/
public class MyEvent extends Event
{
private var _data:*; public function get data():*{
return _data;
} public function MyEvent(type:String, $data:*, bubbles:Boolean=false, cancelable:Boolean=false)
{
super(type, bubbles, cancelable);
this._data = $data;
} public override function clone():Event{
return new MyEvent(this.type, this._data, this.bubbles, this.cancelable);
}
}
}