This content has been marked as final. Show 3 replies
You can work with "the key" and "the keycode" to verify
what key was pressed.
create the following handler in a moviescript to test it.
put the key
put the keycode
now you know the keykodes for
Left Arrow : "123"
Right Arrow: "124"
extent your handler:
--put the key
--put the keycode
case (the keycode) of
go previous -- ( go to the previous marker)
go next (go to the next marker)
now you are able to extend you handler with most keyboard keycodes
I like to add "unload" right before the go next line.
"wherold" <email@example.com> wrote in message
> You can work with "the key" and "the keycode" to verify
> what key was pressed.
> create the following handler in a moviescript to test it.
> on keyup
> put the key
> put the keycode
> now you know the keykodes for
> Left Arrow : "123"
> Right Arrow: "124"
> extent your handler:
> on keyup
> --put the key
> --put the keycode
> case (the keycode) of
> go previous -- ( go to the previous marker)
> go next (go to the next marker)
> end case
> now you are able to extend you handler with most keyboard keycodes
> :) Wolfgang
I've created a slide show type application where arrow keys as well as PageUp and
PageDown were used to move forward and back. Forward and Back were not always
'previous' or 'next' markers. So, I created buttons on the stage that acted as
forward and back, and each button had the regular mouseUp event with the link to
the suitable location. I actually put the buttons off stage and in a movie script
case the keyCode of
121 : sendSprite (10, #mouseUp) -- pageUp
116 : sendSprite (11, #mouseUp) -- pageDown
Using the 'sendSprite', when the user pressed a key, I could activate the behavior
attached to the related navigation sprite. And, I could easily add or remove key
controls by changing the movie script.
I have more info on using sendSprite, sendAllSprites and call commands at::
Director Lecturer / Consultant / Director Enthusiast