-
1. Re: disable key event
James Newton, ACP Jul 8, 2013 7:31 AM (in response to tyree_2)With current technology, you can't prevent the user from pressing keys, but you can ignore any key presses that they make. Here's a handler that will make your movie ignore everything except vowels:
on startMovie()
the keyDownScript = \
"if ""E&"aeiou""E&" contains the key then"&RETURN&\
" -- Let the key press be treated"&RETURN&\
" else"&RETURN&\
" stopEvent"&RETURN&\
" end if"
end
If the #keydown event is stopped then no sprite or member will receive an indication that a character has been typed.
You might like to look at the keydown event handler and build your own custom solution.
-
2. Re: disable key event
tyree_2 Jul 10, 2013 12:34 AM (in response to James Newton, ACP)what I need is to limit keys for a few seconds. this is to stop a key from being pressed then pressed immediately afterwards before it should be pressed again. Ill see If I can work this into that thanks
-
3. Re: disable key event
tyree_2 Jul 12, 2013 7:25 AM (in response to tyree_2)after trying the code it gave me an error after the 1st line. operand expected. but I made some progress by linking the button press to the animation time. pressing a button before an animation is finished. wont cause the button to fire. which is what I was after


