Answered
download file from server
hey there, how do I initiate the download function in ActionScript3.0.?
(Where a dialogue box will be opened to let my users download a file from my server)
hey there, how do I initiate the download function in ActionScript3.0.?
(Where a dialogue box will be opened to let my users download a file from my server)
var download_btn;
import flash.net.URLRequest;
import flash.net.FileReference;
download_btn.addEventListener(MouseEvent.CLICK , downloadFunction);
function downloadFunction(event: MouseEvent):void {
var req:URLRequest = new URLRequest('http://www.yoursite.com/downloads/filename.zip');
new FileReference().download(req);
}
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.