-
-
Save alonecuzzo/669948 to your computer and use it in GitHub Desktop.
OMFG PAUL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DataHandler extends EventDispatcher { | |
private static var _instance:DataHandler; | |
private static var allowInstantiation:Boolean; | |
private var xmlPath:String; | |
private var xml:XML; | |
private var xmlLoader:URLLoader; | |
private static var _xmlpath:String; | |
public function setXMLPath (thisXML:String) : void { | |
_xmlpath = thisXML; | |
} | |
public function loadIt():void { | |
trace("DataHandler.loadIt()"); | |
xmlLoader = new URLLoader(); | |
xmlLoader.addEventListener(Event.COMPLETE, onLoadComplete); | |
xmlPath = _xmlpath; | |
//xmlLoader.addEventListener(Event.OPEN, onLoadOpen); | |
//xmlLoader.addEventListener(ProgressEvent.PROGRESS, onLoadProgress); | |
//xmlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityErrorEvent); | |
//xmlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, onHTTPStatusEvent); | |
//xmlLoader.addEventListener(IOErrorEvent.IO_ERROR, onIOErrorEvent); | |
try | |
{ | |
xmlLoader.load(new URLRequest(xmlPath)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment