public function Main( ) { var loader:URLLoader = new URLLoader( ); //loader.dataFormat = DataFormat.TEXT; loader.addEventListener( Event.COMPLETE, handleComplete ); loader.load( new URLRequest( "example.xml" ) ); }
private function handleComplete( event:Event ):void { try { var example:XML = new XML( event.target.data ); trace( example );
} catch ( e:TypeError ) { trace( "Could not parse text into XML" ); trace( e.message ); } } } }
Related Scripts with Example Source Code in same category :