Posted By

hejaaa on 01/14/11


Tagged

class xml load


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

kure69
dubogii
merritt212


xml loader class


 / Published in: ActionScript 3
 

  1. package code.utils {
  2. import flash.events.Event;
  3. import flash.events.IOErrorEvent;
  4. import flash.net.URLRequest;
  5. import flash.net.URLLoader;
  6. public class LoaderXml {
  7. public static function load(url:String, completeFun:Function, errorFun:Function = null){
  8. var loadXml:URLLoader = new URLLoader();
  9. loadXml.addEventListener(Event.COMPLETE, completeFun);
  10. errorFun == null ? null : loadXml.addEventListener(IOErrorEvent.IO_ERROR, errorFun);
  11. loadXml.load(new URLRequest(url));
  12. }
  13.  
  14. }
  15.  
  16. }

Report this snippet  

You need to login to post a comment.