Flipping graphic with a Key

Michael Kristensen michael-kristensen at dsa-net.dk
Wed Oct 13 09:35:01 EDT 2010


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?

Mic


More information about the use-livecode mailing list