Count number of clicks and store it

Click the button and the movie plays, the counter is increased by 1, and the visitor is redirected. The counter needs to be stored so the next visitor sees how many previous visitors have already clicked. It’s a “Join Now” campaign thing. I have experience in PHP and in Flash animation, but I’ve never made anything in Flash that loads a var, increases the var by 1 when a button is clicked, then stores it externally.

I’ve found a couple of “hit counters” out there, but I haven’t seen anything that will add to the counter once the button is clicked, then redirect.

Are you using AS2 or 3 ?

AS2 (Macromedia Flash Pro version 8)

You want to check out the sendAndLoad() method in ActionScript 2. This will allow you to send your new var to a PHP page which can then store it in a database.

As for getting the number into the Flash application in the first place, check out the loadVars() command for loading data in from a PHP page.