bvlahos at jpl.nasa.gov
Tue Jul 30 10:43:01 EDT 2002
Use keyUp (or rawKeyUp) instead of down.
It would make more sense to me to use the ESC key instead of control key
to stop the presentation unless it was control-s (or something). To use
the ESC key simply put in an on escapeKey handler.
go to card "main menu"
On Tuesday, July 30, 2002, at 07:51 AM, Simtech Publications wrote:
> Hello All:
> I'm still struggling trying to get out of my Director/Lingo habits. I'm
> trying to intercept simple keyboard events but I'm having problems. This
> project is a simple slideshow that advances card by card using the
> So far this works fine...
> on rawkeydown thekey
> if thekey = space then
> play "beep1"
> go next
> end if
> end rawkeydown
> However, I need to prevent the slideshow from "running away" if the user
> holds the spacebar down. In Director this works...
> repeat while the keypressed = " "
> end repeat
> Transcript doesn't like that. Any suggestions on how to bring things
> to a
> halt until the spacebar is released?
> Also, I want the user to be able to go back to the main menu by
> pressing the
> control key at any time during the slideshow. I tried doing this in an
> handler in the card script as follows...
> on idle
> if the controlkey is down then go to cd "main menu"
> end idle
> This only works inconsistently. I can't explain why. Can anyone help?
> Cheers... Bill Lynn, Publisher
> Simtech Publications
> use-revolution mailing list
> use-revolution at lists.runrev.com
More information about the Use-livecode