Return to Snippet

Revision: 39207
at April 6, 2011 02:22 by hejaaa


Updated Code
package code.utils {
	import flash.events.Event;
	import flash.events.IOErrorEvent;
	import flash.net.URLRequest;
	import flash.net.URLLoader;
	public class LoaderXml {
		public static function load(url:String, completeFun:Function, errorFun:Function = null){
			var loadXml:URLLoader = new URLLoader();
			loadXml.addEventListener(Event.COMPLETE, completeFun);
			errorFun == null ? null : loadXml.addEventListener(IOErrorEvent.IO_ERROR, errorFun);
			loadXml.load(new URLRequest(url));
		}

	}

}

Revision: 39206
at January 14, 2011 20:58 by hejaaa


Initial Code
package code.utils {
	import flash.events.Event;
	import flash.events.IOErrorEvent;
	import flash.net.URLRequest;
	import flash.net.URLLoader;
	public class LoaderXml {
		public static function load(reqXmlUrl:String, completeFun:Function, errorFun:Function = null){
			var loadXml:URLLoader = new URLLoader();
			loadXml.addEventListener(Event.COMPLETE, completeFun);
			errorFun == null ? null : loadXml.addEventListener(IOErrorEvent.IO_ERROR, errorFun);
			loadXml.load(new URLRequest(reqXmlUrl));
		}

	}

}

Initial URL


Initial Description


Initial Title
xml loader class

Initial Tags
class, xml, load

Initial Language
ActionScript 3