/ Published in: ActionScript 3

Here's a simple example of how a user can download their file to their desktop
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
private var request:URLRequest; private var localRef:FileReference; protected function buttonClick():void { request = new URLRequest("soundbyte.mp3"); localRef = new FileReference(); try { // Prompt and downlod file localRef.download( request ); } catch (error:Error) { trace("Unable to download file."); } }
Comments
