package{
import flash.display.Sprite;
import flash.net.*;
import flash.events.*;
public class Main extends Sprite{
var myXML:XML;
var url:URLRequest = new URLRequest("http://www.your-domain.com/test.xml");
var loader:URLLoader = new URLLoader(url);
public function Main(){
loader.addEventListener(Event.COMPLETE, onLoadComplete);
}
function onLoadComplete(event:Event):void {
if (loader.data) {
myXML = XML(loader.data);
}
}
}
}
|