Accessing the Target Object
package {
import flash.display.*;
import flash.net.*;
import flash.events.*;
public class Main extends Sprite {
public function Main( ) {
var urlLoader:URLLoader = new URLLoader( );
urlLoader.addEventListener(Event.COMPLETE, completeListener);
urlLoader.load(new URLRequest("someFile.txt"));
}
private function completeListener (e:Event):void {
trace("Load complete");
}
}
}
Related examples in the same category