# Make user download file

**URL:** <https://forum.kirupa.com/t/make-user-download-file/22912>\
**Category:** flash\
**Created:** [June 10, 2003, 4:41pm UTC](https://forum.kirupa.com/t/make-user-download-file/22912 "2003-06-10T16:41:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![elmago](https://avatars.discourse-cdn.com/v4/letter/e/848f3c/32.png) [@elmago](https://forum.kirupa.com/u/elmago)\
**Post date:** [June 10, 2003, 4:41pm UTC](https://forum.kirupa.com/t/make-user-download-file/22912/1 "2003-06-10T16:41:27Z")

</div>

Hi there

I believe this is an easy one but I cant figure it out. I have mp3s on a site that I want the user to be able to download when clicking on a button. Is there an easy way of doing this in flash MX?

thanx

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 10, 2003, 5:11pm UTC](https://forum.kirupa.com/t/make-user-download-file/22912/2 "2003-06-10T17:11:40Z")

</div>

When you say download, I’m assuming you just want it to be downloaded and not played. If that’s correct then you can use getURL and it should do the trick, something like this:[AS]on (release) {  
getURL(“[http://www.yoursite.com/songname.mp3](http://www.yoursite.com/songname.mp3)”);  
}  
[/AS]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 10, 2003, 5:55pm UTC](https://forum.kirupa.com/t/make-user-download-file/22912/3 "2003-06-10T17:55:05Z")

</div>

thanx electrongeek but I have tried that and it opens a new window and streams the song. I would like the user to be able to save it on the drive, something like rightclicking and save taget as. Or at least a little window asking if he/she wants to save or open the file. I hope this explenation clears your mind.

Armin

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 10, 2003, 5:57pm UTC](https://forum.kirupa.com/t/make-user-download-file/22912/4 "2003-06-10T17:57:46Z")

</div>

mp3s are set to stream by default on most browsers. If you want them to download it, place it in a ZIP file and have the user download the zip. I don’t think there is any other way…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 10, 2003, 6:00pm UTC](https://forum.kirupa.com/t/make-user-download-file/22912/5 "2003-06-10T18:00:58Z")

</div>

Yeah Jubba is right, placing it in a zip file will solve that problem and it will probably reduce file size and reduce download time as well.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 10, 2003, 6:26pm UTC](https://forum.kirupa.com/t/make-user-download-file/22912/6 "2003-06-10T18:26:57Z")

</div>

thank you for the help guys 🙂

rock on
