# Script for a "download" button

**URL:** https://forum.kirupa.com/t/script-for-a-download-button/13300
**Category:** Uncategorized
**Created:** [February 11, 2003, 4:20pm UTC](https://forum.kirupa.com/t/script-for-a-download-button/13300 "2003-02-11T16:20:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Melissa\_Anne](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@Melissa\_Anne](https://forum.kirupa.com/u/Melissa_Anne)
#### Post date: [February 11, 2003, 4:20pm UTC](https://forum.kirupa.com/t/script-for-a-download-button/13300/1 "2003-02-11T16:20:45Z")

</div>

On my stage i have a button.

on (press) It should download a file.

What is the actionscript for that?

Thxs if you can help !

---

<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: [February 11, 2003, 4:35pm UTC](https://forum.kirupa.com/t/script-for-a-download-button/13300/2 "2003-02-11T16:35:15Z")

</div>

getURL(“linkToDownload.zip”);

I say .zip because its best to zip files you wish to have downloaded.

1. it allows for a smaller filesize, hense smaller download time
2. browsers recognize it as a file format that is to be downloaded and not opened.

---

<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: [February 11, 2003, 4:43pm UTC](https://forum.kirupa.com/t/script-for-a-download-button/13300/3 "2003-02-11T16:43:03Z")

</div>

Yes I did that,

getURL(…) but it doesnt work and the path is correct…  
do I need to have variables (get or post )?

---

<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: [February 11, 2003, 4:45pm UTC](https://forum.kirupa.com/t/script-for-a-download-button/13300/4 "2003-02-11T16:45:30Z")

</div>

There must be a problem with the path. It works without POST or GET.

pom :cowboy:

---

<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: [February 11, 2003, 5:52pm UTC](https://forum.kirupa.com/t/script-for-a-download-button/13300/5 "2003-02-11T17:52:24Z")

</div>

How stupid of me!!!  
It was a path problem…

When writing the path…i wrote my file’s name “cube.zip” instead of writing “Cube.zip” !! Forgot a CAP letter !!!and that made all the difference…grrr!!

Mel\*
