Flipping graphic with a Key WORKING

Michael Kristensen michael-kristensen at dsa-net.dk
Thu Oct 14 08:14:18 EDT 2010


Hi again

Thanks for all replyes

and thanks to all that suggested setting a flag

This script by Malte is working:

> try setting a flag before doing the flipping:
>
> on keydown pkey
>     if pkey = "f" then
>       if not the hasFlipped of me then
>        set the hasFlipped of me to true
>        DoTheFlipping
>      end if
>     end if	
>     pass keydown
> end keydown
>
> on keyUp pkey
>     if pkey = "f" then
>      DoThe_UN_Flipping
>      set the hasFlipped of me to false
>    end if
>     pass keyUp
> end keyUp
>
>
> Hth,
>
> Malte



Mic


More information about the use-livecode mailing list