# Download counter button?

**URL:** https://forum.kirupa.com/t/download-counter-button/12032
**Category:** Uncategorized
**Created:** [January 25, 2003, 7:05pm UTC](https://forum.kirupa.com/t/download-counter-button/12032 "2003-01-25T19:05:34Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![skidpanda](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@skidpanda](https://forum.kirupa.com/u/skidpanda)
#### Post date: [January 25, 2003, 7:05pm UTC](https://forum.kirupa.com/t/download-counter-button/12032/1 "2003-01-25T19:05:34Z")

</div>

Hello folks,

Any idea how I could make a button in flash to download an MP3 file from my server, then increment a dynamic text field by 1 everytime it is downloaded. I dont want the user to be able to increment the counter if they accidently click more than once…

Thanks for any help!

Skid:run: :bounce:

---

<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: [January 25, 2003, 7:49pm UTC](https://forum.kirupa.com/t/download-counter-button/12032/2 "2003-01-25T19:49:01Z")

</div>

well …

you’ll need to zip your mp3

as for the just one click … use the ilyas flag [size=1][lol 😛][/size]

```php
on (release) {
     if (!flag) {
          getURL ("myFile.zip", "_blank")
          flag ++
     }
}

```

i’d need a better idea of what you’re trying to do for the text field

---

<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: [January 25, 2003, 7:52pm UTC](https://forum.kirupa.com/t/download-counter-button/12032/3 "2003-01-25T19:52:21Z")

</div>

Thanks for replying man,

Basically I have a page for my band, when the visitor visits the sounds section there will be 1 song for download. Next to the download button there will be a number telling the user how much times the MP3 has been download already… Like on this message board when someone uploads a .fla for download, it says how many times it has been downloaded by people, catch my drift ?

I need it to do that aswell as only let the user click the button once.

Cheers

---

<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: [January 25, 2003, 7:59pm UTC](https://forum.kirupa.com/t/download-counter-button/12032/4 "2003-01-25T19:59:21Z")

</div>

you have to use php or other server side scripting for that  
what languages are supported by your server?

the just one click can be done like this too:

```php

on (release) {
     getURL ("mySong.zip", "_blank")
     this.enabled = false
}

```

---

<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: [January 25, 2003, 8:01pm UTC](https://forum.kirupa.com/t/download-counter-button/12032/5 "2003-01-25T20:01:33Z")

</div>

PHP is supported. Cheers for the 2nd method, i’ll try that one too! Know of any PHP scripts I could use?

Cheers :bounce:

---

<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: [January 25, 2003, 8:09pm UTC](https://forum.kirupa.com/t/download-counter-button/12032/6 "2003-01-25T20:09:01Z")

</div>

ehmm … hmmm :cyclops:

**h88** is online … surely he has the best answer

---

<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: [January 25, 2003, 9:10pm UTC](https://forum.kirupa.com/t/download-counter-button/12032/7 "2003-01-25T21:10:48Z")

</div>

ok … some progress

i’ll give you the files if you want but rigth now it’s a **mess**

---

<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: [January 25, 2003, 9:16pm UTC](https://forum.kirupa.com/t/download-counter-button/12032/8 "2003-01-25T21:16:49Z")

</div>

Hello again,

Yeah thats what I need, i’m just lookin for some sort of PHP script now, theres a hit counter script on flash-db, i’m just trying to figure out if i could modify it to do what I need 😉  
I would love to see the files please yes.

Cheers

---

<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: [January 25, 2003, 9:38pm UTC](https://forum.kirupa.com/t/download-counter-button/12032/9 "2003-01-25T21:38:48Z")

</div>

sorry … 1 year 2 months later **susi** [size=1][my PC][/size] finally crashed :-\

i took the files from a visitor counter too !! 😛  
at least it works …

here ya go:

---

<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: [January 25, 2003, 9:44pm UTC](https://forum.kirupa.com/t/download-counter-button/12032/10 "2003-01-25T21:44:08Z")

</div>

[http://www.flashkit.com/tutorials/Dynamic\_Content/Simple\_P-Jeffrey\_-656/index.php](http://www.flashkit.com/tutorials/Dynamic_Content/Simple_P-Jeffrey_-656/index.php)

that’s the link to the tutorial … i didn’t change anything in the php file

seeing now how it works i’ll make my own :beam:

---

<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: [January 25, 2003, 9:46pm UTC](https://forum.kirupa.com/t/download-counter-button/12032/11 "2003-01-25T21:46:48Z")

</div>

sorry, i didn’t see this topic, i guess kax ended it up. :+)

---

<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: [January 25, 2003, 9:47pm UTC](https://forum.kirupa.com/t/download-counter-button/12032/12 "2003-01-25T21:47:14Z")

</div>

wow thanks very much, thats exactly what I needed. I think there should be a kirupa award for guys like you that go out of your way help out so much.

Nice flashkit link too!

Thanks again! I’ll go put it on my site so folks can download my song! 😉

skid :+)

---

<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: [January 25, 2003, 9:48pm UTC](https://forum.kirupa.com/t/download-counter-button/12032/13 "2003-01-25T21:48:38Z")

</div>

who cares !!

i wanna know what you’d do !! 😉

---

<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: [January 25, 2003, 9:51pm UTC](https://forum.kirupa.com/t/download-counter-button/12032/14 "2003-01-25T21:51:28Z")

</div>

> I think there should be a kirupa award for guys like you that go out of your way help out so much

😊 thank you very much

\_root.kax.ego ++ 😛

---

<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: [January 26, 2003, 12:41am UTC](https://forum.kirupa.com/t/download-counter-button/12032/15 "2003-01-26T00:41:54Z")

</div>

Hello again, I built that part into my site but i cant get it to work, i think i’ve followed your working example but the counter doesnt increment, the sounds section is loadmovied into the main movie? would that affect the code in your example ?

Hope your still goin about bud,

SKid

:bounce: :bounce: :bounce: boing :bounce: :bounce:

---

<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: [January 26, 2003, 2:53am UTC](https://forum.kirupa.com/t/download-counter-button/12032/16 "2003-01-26T02:53:27Z")

</div>

i don’t think so …

can you post your fla?

---

<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: [January 26, 2003, 4:17am UTC](https://forum.kirupa.com/t/download-counter-button/12032/17 "2003-01-26T04:17:25Z")

</div>

Yeah i’ll post my .fla but i think I know whats up, i already have a counter on the site using the same code etc. So I tried using PHPcounter2.php etc and using the ‘Counter2’ on the text field, changed all the AS to point to the renamed ‘2’ files but it still doesnt work, it makes the main site counter goto 1, and the button press counter doesnt change at all.  
The site is here - [www.method-band.co.uk](http://www.method-band.co.uk) but I set the site back to normal after I couldnt get the button counter to work.

Cheers

(-:

---

<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: [January 26, 2003, 9:10am UTC](https://forum.kirupa.com/t/download-counter-button/12032/18 "2003-01-26T09:10:00Z")

</div>

hey … sorry about the delay :-  
you know … saturday … drinks … ehemm girls … bla bla bla 😛

i’ll finish my counter tomorrow … i’ll give you the files as soon as possible

in the meantime … did you change the variables in the php and txt files ??

---

<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: [January 26, 2003, 5:41pm UTC](https://forum.kirupa.com/t/download-counter-button/12032/19 "2003-01-26T17:41:27Z")

</div>

Hey no worries man, drink and girls always come before counters 😉 lol

I did change the PHP variables, all to like ‘2’ after each one, still didnt work - i’m most likly doin it wrong.

Lookin forward to seeing yours, cheers

---

<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: [January 26, 2003, 10:01pm UTC](https://forum.kirupa.com/t/download-counter-button/12032/20 "2003-01-26T22:01:43Z")

</div>

\<space\>

[Next page](https://forum.kirupa.com/t/download-counter-button/12032.md?page=2)
