Flipping graphic with a Key

Richmond richmondmathewson at gmail.com
Wed Oct 13 09:57:09 EDT 2010

  On 10/13/2010 04:35 PM, Michael Kristensen wrote:
> Hi there
> I want to flip a graphic while key "F" is down and when it is released 
> the graphic shall flip back again.
> if it was a mouseDown handler it would go like this:
> on mouseDown
>     put the points of graphic into oldPoints
>     DoTheFlipping
>     wait while the mouse is down
>     set the points of graphic to oldPoints
> end mouseDown
> But when i use a keyDown handler I have a problem because when i hold 
> the "F" key down repetition of the message set in and the graphic is 
> flipped back and fourth.
> How do I avoid the repetition of the keyDown message?

I have just tried this with rawKeyDown/rawKeyUp  and keyDown/keyUp  and 
have the same
problem; unfortunately while there is mouseStillDown there is NOT 

More information about the Use-livecode mailing list