Download the file from the server

Hey there, how I start the download function in ActionScript3.0. ?

(Where a dialog box will open to let my users to download a file from my server)

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);
}

Tags: Adobe Animate

Similar Questions

Maybe you are looking for

  • Unable to sync after installing iOS 10.0.2

    After installing iOS 10.0.2 this morning, I was not able to sync my iPhone 6 s + with my MacBook Pro running Sierra. Y at - it something I need to do. I turned off the phone and computers and they started separately, but not luck. I tried to sync wir

  • How can I remove old apps from my phone?

    In the app store is a list of all former applications, I deleted from the face of my phone and updates, I did. Is it possible to remove these and clean up this list?

  • Need to replace the internal hard drive

    Hello all, I need to replace the hard drive internal for T61p, product identification 6459cto. What I ask? Thanks Ldxrunner 2015

  • gated two error of counter-200452 edge

    Hello Forum, As I wrote earlier, I am implementing a measure of separation of two edges that can be blocked. In an updated version of an earlier program, I tried to use the node property relaxing break. However, I can't work and still receive a 20045

  • draw on the video preview

    Hello Could someone tell me if it is possible the purpose of layering on the preview of the video? I mean I want to draw (or place some controls) during the preview of the video in my application. Thank you.