Reply to: RE: <lingo-l> esc and enter
Here's the short answers to your questions.
Fabio wrote:
> I need the esc button >to go to a specific .dir (like exit.dir). Here's a quick
>(intested) example for movie scripts
In your startMovie/preparemovie handler:
set the exitLock = TRUE -- this will stop the esc key from quitting the projector
set the keyUpScript = "checKey" --this will trap keystrokes (you probably have your
own done already)
on checKey
lastKey = the keyCode --a code for the last key pressed
case lastKey of
53: go movie "exit" --keyCode 53 is the esc key
-- other keystrokes here
end case
end
And I have an exercise in which >I'm supposed to write some text and when I press
enter it executes a >behavior... what I have right now is the behavior attached to a
button (on >mouseup me), and when I press enter it just jumps to a new line in the
text >field...
>
In your behavior attached to the editable text (text should be set to 'fixed' size on
stage) you need to trap the enter key as it is pressed (on keyDown), before it is
released (on keyUp), so that it does not get entered in to the text field as a line
break.
on keyDown me
--your code here
stopEvent --should be unnecessary, it stops the keyDown event getting passed
further along
end
johnAq
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]