>Is there an easy way to prevent the second click from registering on
>the thumbnail icon?

In true packrat fashion, I have all of my old copies of the Lingo User's
Journal that I received via snail-mail many years ago. In the May 1997
issue, Denise Hazelwood wrote an article called "Click Prevention:
Damnfoolproofing Your Buttons" and I've used the little routine that she
published for years to keep people from trashing my buttons with
double-triple-and more clicks (I write a lot of stuff for kids...they just
like to click for fun and it can really mess with things).

It's a little "if" statement that surrounds whatever you want the button to
do. It uses one variable that gets set at the end of the routine and is
compared to the current time at the beginning. Like this...

on mouseDown
        global gClickerTime
        put the ticks into whatTime
        if whatTime > gClickerTime then
                --- run your routine or call your handler here
                put (the ticks + 20) into gClickerTime
        end if
end mouseDown

That could be (the ticks + 30) or 40 or whatever. 20 seems to be pretty
effective. The simple beauty is that no matter how long the routine takes to
run, since the limiting time is set after the routine completes, you've got
that much of a pad before that button (or any other button where you force
the comparison) will accept another mouseclick. It basically locks out all
mouse clicks for 20 ticks. Set gClickerTime to the current ticks in your
onStartMovie script so that it has something in it to begin with.

Hope this helps.

Al

Allen Stare
Intense Multimedia, Inc.

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to