Add SecurityErrorEvent.SECURITY_ERROR event handler
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="initializeHandler(event)"> <mx:Script> private function initializeHandler(event:Event):void { var loader:URLLoader = new URLLoader( ); loader.load(new URLRequest("a.xml")); loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityErrorHandler); } private function securityErrorHandler(event:SecurityErrorEvent):void { errors.text += event + "\n"; } </mx:Script> <mx:TextArea id="errors" /> </mx:Application>