A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [CS3] Download Video Button

  1. #1
    Junior Member
    Join Date
    Nov 2008
    Posts
    1

    [CS3] Download Video Button

    Ok here's the problem, I have a number of HD video files in .mov and .wmv format on my website. I have a number of buttons created that I want to use to download these files.

    I used the following for example:

    QT2.addEventListener(MouseEvent.CLICK,downloadFunc tion3);
    function downloadFunction2(event:MouseEvent) {
    var request = new URLRequest('sketchup_720p.mov');
    navigateToURL(request);
    }
    WM2.addEventListener(MouseEvent.CLICK,downloadFunc tion3);
    function downloadFunction3(event:MouseEvent) {
    var request = new URLRequest('sketchup_720p.wmv');
    navigateToURL(request);
    }


    Depending on the browser this either fails completely or it tries to open the files in the browser. Is there an easy way to script for a button to download only a .mov or .wmv file?

  2. #2
    Junior Member
    Join Date
    Aug 2008
    Posts
    24
    With any type of file extension it will depend on how each site visitor has set their browser to deal with that extension. You have no control over this.

    If you want to force a download of the video (or any type of file) you'll need to stick your video files in a .zip or .sit etc and link to them as you are now. The browser will give the option to download the file. I know no other 'foolproof' way to work across all browsers and platforms.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center