Listen to the URLLoader complete event
package {
import flash.events.*;
import flash.net.*;
import flash.display.*;
public class Main extends Sprite{
public function Main( ) {
var loader:URLLoader = new URLLoader( );
loader.addEventListener( Event.COMPLETE, handleComplete );
// loader.dataFormat = DataFormat.VARIABLES;
loader.load( new URLRequest( "test.cfm" ) );
}
private function handleComplete( event:Event ):void {
var loader:URLLoader = URLLoader( event.target );
trace( "someText = " + loader.data.someText );
}
}
}
Related examples in the same category