A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Times Clicked

  1. #1
    Senior Member
    Join Date
    Dec 2000
    Posts
    213

    Times Clicked

    Can someone help me with the code here.

    If times clicked =1 then do something, If times clicked =2 then do something, If times clicked =3 then do something, If times clicked =4 then do something,

    Thanks

  2. #2
    pablo cruisin' hanratty21's Avatar
    Join Date
    Mar 2002
    Location
    on the lam
    Posts
    2,275
    onRelease()
    timesClicked++;

    Then use that variable in your if then statement.

    RH
    "Why does it hurt when I pee?" -- F. Zappa |

  3. #3
    Senior Member
    Join Date
    Dec 2000
    Posts
    213

    Need a little more

    Can you send me an example

  4. #4
    pablo cruisin' hanratty21's Avatar
    Join Date
    Mar 2002
    Location
    on the lam
    Posts
    2,275
    I am in a good mood today...here's an fla file for you...I hope you have FlashMX!

    RH
    Attached Files Attached Files
    "Why does it hurt when I pee?" -- F. Zappa |

  5. #5
    pablo cruisin' hanratty21's Avatar
    Join Date
    Mar 2002
    Location
    on the lam
    Posts
    2,275

    SCRATCH THE PREVIOUS ONE...

    I added the if then statements in for you on this one.

    RH
    Attached Files Attached Files
    "Why does it hurt when I pee?" -- F. Zappa |

  6. #6
    Senior Member
    Join Date
    Dec 2000
    Posts
    213

    Thanks

    I tweaked your code a bit.. what am I doing wrong.

    Thanks Again
    Attached Files Attached Files

  7. #7
    pablo cruisin' hanratty21's Avatar
    Join Date
    Mar 2002
    Location
    on the lam
    Posts
    2,275
    If I may ask...what the hell are you trying to do here? It seems like you are trying to track a click vs. a double-click vs. a triple-click, etc.

    If this is the case...let me be the first to tell you...it wont work.

    If not, please enlighten me.

    RH
    "Why does it hurt when I pee?" -- F. Zappa |

  8. #8
    Senior Member
    Join Date
    Dec 2000
    Posts
    213
    :s

    You guessed right.. Trying to track a click, double click, triple click and 4 clicks..

    Any suggestions if this does not work?

    Thanks for all your help

    Uday

  9. #9
    pablo cruisin' hanratty21's Avatar
    Join Date
    Mar 2002
    Location
    on the lam
    Posts
    2,275
    The only way I could think is to use the same concept as I have there, but you will need to start a timer after the first click. Let's say the timer is set to 1/4 of a second. If, within the time of that timer running out, the button is clicked again, you increase the variable and start the timer again....and so on.

    If the timer runs out, then you run through the if then sequence.

    This would take some serious scripting though...and...IMHO, it probably will still be seriously buggy.

    Good luck.

    RH
    "Why does it hurt when I pee?" -- F. Zappa |

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