A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Click Counter

  1. #1
    Junior Member
    Join Date
    Aug 2001
    Posts
    12

    Click Counter

    Hi,

    Does anyone know how to make a simple button that counts how many times it has been clicked and show it on screen? It's not for web purposes so I don't need it to count how many times it has been hit. It's for creating a prototype of a graphical user interface that shows how many times the user has clicked a button on screen.

    Thanks

    All_Nighter

  2. #2
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Make a button on root. Put this on it;

    on(press) {
    counter++;
    }

    On another layer, make a Dynamic text box and give it the var name of counter. Your done, test it.

  3. #3
    Junior Member
    Join Date
    Aug 2001
    Posts
    12
    That's super cool. Thanks.

  4. #4
    Junior Member
    Join Date
    Jan 2007
    Posts
    15
    Mine just is blank.... then when I press my button it say NaN

  5. #5
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Look at the fla.
    Attached Files Attached Files

  6. #6
    Junior Member
    Join Date
    Jan 2007
    Posts
    15
    Thats exactly what I do... My Flash looks way diff, the eye is diff, the lock is diff, and the line is diff... wow...

  7. #7
    Junior Member
    Join Date
    Jan 2007
    Posts
    15
    My flash looks different, here is mine:
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center