eventexample.as

来自「flash强大事件机制扩展类」· AS 代码 · 共 33 行

AS
33
字号
package 
{
	//----------------------------------------
	import flash.events.Event;
	import flash.events.IOErrorEvent;
	import flash.events.HTTPStatusEvent;
	import flash.display.Sprite;
	//----------------------------------------
	import EventClass;
	//----------------------------------------
	public class EventExample extends Sprite
	{
		public function EventExample()
		{
			var ee:EventClass = new EventClass("http://localhost/Example/AS3/events/Event/EventExample.xml");
			ee.addEventListener(Event.COMPLETE, this.completeHandler);
			ee.addEventListener(IOErrorEvent.IO_ERROR, this.ioErrorHandler);
			ee.addEventListener(HTTPStatusEvent.HTTP_STATUS, this.httpStatusHandler);
		}
		private function completeHandler(evt:Event):void
		{
			trace(evt);
		}
		private function ioErrorHandler(evt:IOErrorEvent):void
		{
			trace(evt);
		}
		private function httpStatusHandler(evt:HTTPStatusEvent):void
		{
			trace(evt);
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?