How do I prevent a Key being pressed down all the time?

BNig niggemann at uni-wh.de
Sat Sep 27 16:41:31 EDT 2008


Hi Andreas and William,

Andreas that is very nifty and works for me, it seems though you left out
the local variable.
William you would have to script the other arrowKeys if you use them in your
program.

This works for me in a stack script:

---------
local pressed
on arrowKey theKey
    if pressed = "" then put false into pressed -- first round
    if (theKey = "Right") and (not pressed) then
        move img "dummy" relative 30,0
        put true into pressed
    end if
end arrowKey

on rawKeyUp keycode
    if keycode = 65363 then put false into pressed
end rawKeyUp
-----------

cheers 

Bernd
-- 
View this message in context: http://www.nabble.com/How-do-I-prevent-a-Key-being-pressed-down-all-the-time--tp19701916p19706261.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list