repeating key delay time
Malte Brill
revolution at derbrill.de
Wed Aug 2 11:11:47 EDT 2006
Hi Scott,
I would recommend a timed script and checking the keysDown. This
would allow for multiple directions at the same time, if desired.
A stack with two buttons (1 of them is called "myMovingButton")
Script of the first button:
on mouseUp
set the navigationArrows to false
set the flag of me to not the flag of me
if the flag of me then hereWeGo
end mouseUp
on hereWeGo
--put the keysDown
repeat for each item theItem in the keysDown
put item 1 of the loc of btn "myMovingButton" into tX
put item 2 of the loc of btn myMovingButton into tY
switch theItem
case "65361"
set the loc of btn "myMovingButton" to tX - 1,tY
break
case "65362"
set the loc of btn "myMovingButton" to tX,tY - 1
break
case "65363"
set the loc of btn "myMovingButton" to tX + 1,tY
break
case "65364"
set the loc of btn "myMovingButton" to tX,tY + 1
break
end switch
end repeat
if the flag of me then send hereWeGo to me in 50 milliseconds
end hereWeGo
If you click that button, the "myMovingButton" control can move left,
right, up, down, upLeft, upRight, downLeft and downRight using the
arrowKeys.
All the best,
Malte
More information about the use-livecode
mailing list