Skip to content

Instantly share code, notes, and snippets.

@caubry
Last active December 21, 2015 20:58
Show Gist options
  • Select an option

  • Save caubry/6364736 to your computer and use it in GitHub Desktop.

Select an option

Save caubry/6364736 to your computer and use it in GitHub Desktop.
protected var callback:Function;
public function ConfigLoader( path:String, _callback:Function )
{
this.callback = _callback;
var configLoader:URLLoader = new URLLoader();
configLoader.load( new URLRequest( path ) );
configLoader.addEventListener( Event.COMPLETE, processXML );
}
protected function processXML( event:Event ):void
{
var myXML:XML = new XML( event.target.data );
callback( myXML );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment