// browse button function. public function browse_file(eve:MouseEvent):void{ file1 = File.documentsDirectory; file1.addEventListener(Event.SELECT, handleSelectFile); file1.browseForOpen("Select Picture"); } public function handleSelectFile(event:Event):void { file_name.text = event.target.nativePath; fname=event.target.name; fnamearr.push(event.target.name); var request:URLRequest = new URLRequest(file_name.text); var urlLoader:URLLoader = new URLLoader(request);//===>(here is the error in loading path in mac.. URLLoader IOErrorEvent.IO_ERROR.) urlLoader.addEventListener(Event.COMPLETE, onURLLoaderComplete); urlLoader.dataFormat = URLLoaderDataFormat.BINARY; urlLoader.load(request); } private function onURLLoaderComplete(event:Event):void { loadedFile = event.target.data; var encoder:Base64Encoder=new Base64Encoder(); encoder.encodeBytes(loadedFile); byte=encoder.toString(); bytesarr.push(byte); //byte=encoder.encode(loadedFile); Alert.show('==>'+file_name.text); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)