connect so:

Security.allowDomain(''); Security.loadPolicyFile(""); 


 loader.load(new URLRequest("")); 

does not work.


 <cross-domain-policy> <allow-access-from domain="*" /> </cross-domain-policy> 

what's wrong?


alt text

  • So you are not working with the browser? - ShockWave
  • If you run SWF on the desktop, it is better to collect the AIR application, there are no restrictions on cross-domain security policy. - ShockWave
  • I'm just a test here because it displays information about the error. And in the browser simply does not load the data. - Ilya Chizhanov
  • The browser is not debug version, so it does not display an error. Here it outputs - This flash drive is knocking on your server and loads hml with the output, also prints errors. - ShockWave

1 answer 1

everything works, the code is:

 protected function executeTest():void { var loader:URLLoader = new URLLoader(); var req:URLRequest = new URLRequest(''); loader.addEventListener (Event.COMPLETE, completeHandler, false, 0, true); loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); loader.load (req); } protected function completeHandler(event:Event):void { trace( ); } private function errorHandler(event:Event):void { trace("Error: " + event); } 

Also, check that the crossdomain is correct, ideally it should be like this:

 <?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM ""> <cross-domain-policy> <allow-access-from domain="*" to-ports="*"/> </cross-domain-policy>