public class Main extends Sprite { public function Main( ) { var urlLoader:URLLoader = new URLLoader( ); urlLoader.addEventListener(Event.COMPLETE, completeListener); urlLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorListener); urlLoader.load(new URLRequest("someFile.txt")); }
private function completeListener (e:Event):void { trace("Load complete"); }