A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: How to make button download file

  1. #1
    Senior Member gkbdave's Avatar
    Join Date
    Nov 2000
    Location
    Fort Bragg, NC
    Posts
    304
    I was wondering if someone can help me.. I want to make a animated button that when click on, it downloads a file.. I have been looking every where for a tutorial or info but no luck.. Can this be done?? or am I wasting my time?
    Thanks..

  2. #2
    Senior Member
    Join Date
    Oct 2000
    Location
    Barcelona
    Posts
    875
    I'd guess that if you set getURL to a .zip/.mp3/.exe etc (whatever file you wanted to be downloaded) the user's system, be it Windows, Mac, Linux or any of the others, will automatically recognize that it's in a format that can't be displayed in a browser window and will offer the user the option to download it or not.

    So set the button action to :
    on (release) {
    getURL ("http://www.whatever.com/dlThis.zip");
    }
    rather than directing it to an .html.

    Please tell me if this works for you.

  3. #3
    Senior Member gkbdave's Avatar
    Join Date
    Nov 2000
    Location
    Fort Bragg, NC
    Posts
    304
    Hey thanks.. .I will try it tomorrow morning.. Its a word document and a PDF document that needs to be downloadable.. Hope it works.. Thanks again

  4. #4
    Senior Member
    Join Date
    Oct 2000
    Location
    Barcelona
    Posts
    875
    .doc or .rtf (word) will be downloadable. .pdf will open in the browser window using the Adobe Reader. If you're offering .pdf's, put in a link to the Adobe website for the user to download the Reader in case they don't have it installed.

    Who says there's no bonding between Adobe and Macromedia eh?? ;-)

  5. #5
    Senior Member gkbdave's Avatar
    Join Date
    Nov 2000
    Location
    Fort Bragg, NC
    Posts
    304
    thanks for the tip.. I will definetely do that....

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