FLASH  back to
HIT COUNTER  

 

flash mx hit counter
the flash mx hit counter is a flash movie that records the number of times it has been viewed (aka "hit"). to track hits, the hit counter uses moock.org's generic flat file database known as "textdb". the hit counter can be safely included in larger projects--it functions normally even when loaded into a movie clip or level.

how to use the hit counter
to use the hit counter on your site, follow these steps:

  1. Download and extract textdb.zip.
  2. Place textdb.pl in a CGI-enabled directory of your web site.
  3. Make textdb.pl executable (typically, this means setting the file's permissions to 755).
  4. On Unix, set the path to the Perl interpreter on the first line of textdb.pl. By default the location is set to:
    #! /usr/local/bin/perl
  5. Download and extract moockHitCounter.zip.
  6. Open hitcounter.fla in Flash MX or later.
  7. On frame 6 of the "scripts" layer, specify the location of textdb.pl on your site. For example,
    var scriptURL = "http://www.yoursite.com/cgi-bin/textdb.pl";
  8. Optionally, you may also specify the name of your hit counter database. For example:
    var dbName = "flashpagehits";
    By specifying different database names, you can use textdb.pl to track hits for multiple flash movies.
  9. Export your movie (File >> Publish).
  10. Place the exported hitcounter.swf file on your website.
  11. Watch in fascination as the hits accrue.

preview
you can see the flash mx hit counter in action on my flash page, at the very bottom.

revision history
october 19, 2002: posted.