Download counter button?

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:

well …

you’ll need to zip your mp3

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

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

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

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:


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

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

Cheers :bounce:

ehmm … hmmm :cyclops:

h88 is online … surely he has the best answer

ok … some progress

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

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 :wink:
I would love to see the files please yes.

Cheers

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

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

here ya go:

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:

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

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! :wink:

skid :+)

who cares !!

i wanna know what you’d do !! :wink:

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

:blush: thank you very much

_root.kax.ego ++ :stuck_out_tongue:

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:

i don’t think so …

can you post your fla?

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 but I set the site back to normal after I couldnt get the button counter to work.

Cheers

(-:

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

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 ??

Hey no worries man, drink and girls always come before counters :wink: 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

<space>