ActionScript 3 AS3修订了自定义事件类

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ActionScript 3 AS3修订了自定义事件类相关的知识,希望对你有一定的参考价值。

package  
{
	import flash.events.Event;
	
	/**
	 * ...
	 * @author Jeff Nehlsen
	 */
	public class CustomEvent extends Event 
	{
		// Event types.
		public static const EVENT_DEFAULT:String = "event1";
		public static const EVENT_CUSTOM:String = "event2";

		public function CustomEvent(type:String = CustomEvent.EVENT_DEFAULT, bubbles:Boolean = false, cancelable:Boolean = false) 
		{
			super(type, bubbles, cancelable);
		}
		
		override public function clone():Event {
			// Return a new instance of this event with the same parameters.
			return new CustomEvent(type, bubbles, cancelable);
		}
	}
}

以上是关于ActionScript 3 AS3修订了自定义事件类的主要内容,如果未能解决你的问题,请参考以下文章