Try catch error
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="initializeHandler(event)"> <mx:Script> import flash.net.FileReference; private function initializeHandler(event:Event):void { var file:FileReference = new FileReference( ); try { file.browse( ); } catch(error:Error) { errors.text += error; } } </mx:Script> <mx:TextArea id="errors" /> </mx:Application>