Flipping graphic with a Key

J. Landman Gay jacque at hyperactivesw.com
Wed Oct 13 11:43:49 EDT 2010


Michael Kristensen wrote:

> How do I avoid the repetition of the keyDown message?

You'll need to set up a "send" structure that checks the keysdown(). 
Something like this:

on keydown pkey
   if pkey = "f" then
     doTheFlipping
     send "checkKey" to me in 0
   else
     pass keydown
   end if
end keydown

command checkKey
   if "102" is in keysdown() then -- 102 is the keycode for "f"
     send "checkKey" to me in 250 milliseconds -- adjust timing here
   else
     doTheFlipping
   end if
end checkKey

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list