Scrolling with keys

Scott Rossi scott at tactilemedia.com
Tue Jun 24 02:21:01 EDT 2003


Recently, Ken Norris wrote:

>> One basic way to manage the scroll is to use the keyDown (or rawKeyDown)
>> message to set the scroll of the object:
>> 
>> on rawKeyDown K
> snip
> 
> I think I understand the rawKeyDown part, but...
> 
> Ummm. No, I mean continuous smooth scrolling while holding the key down,
> like the mouse would do while holding it down on a scrolling field's arrow
> keys. The joystick controller I'm looking into only sends keyboard messages
> according to how it's programmed in the hardware itself, but not mouse
> messages.
> 
> For example, if the stick forward switch is set to "f" then I believe it
> will send a continuous stream of "f"'s to the computer as long as it's held
> forward.
> 
> Actually, in this case, I want it to scroll continuously in either
> direction, like its on a belt. I've already written scripts for it in HC
> which work, so I have the method together. I'm attempting to make it a
> little more generic for editing purposes.

I'm not sure I understand.  Trapping the keyDown message in the posted
script will cause scrolling to take place continuously while the key is held
down, and then stop when the key is released.

Is this not what you're looking for?

Regards,

Scott Rossi
Creative Director

Tactile Media, Multimedia & Design
Email: scott at tactilemedia.com
Web: www.tactilemedia.com




More information about the use-livecode mailing list