This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-02-14 08:25:26

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Scroll wheel in offline Scratch tutorial!

This topic (http://scratch.mit.edu/forums/viewtopic.php?id=14244) remembered me of t5he scroll wheel feature in Scratch, and I'd like to give some more help on it. Thanks Dan01! Check out an example of this feature at http://scratch.mit.edu/projects/Dan01/413561 .

What it does...
When you roll the scroll wheel up, all "When up arrow key pressed" hats are triggered,
When you roll the scroll wheel down, all "When down arrow key pressed" hats are triggered.

[blocks]<when[ Up arrow ]key pressed>[/blocks]

However, the key sensing block (the light blue one) does not react to the scroll wheel.


And how to use it!
So, we know the Up and Down arrow Key hats (from the "control category) are started with the scroll wheel, but the [sensing] block isn't. But, our scroll wheel scripts should not be run with the up and down arrow keys. ...

[blocks]
<when[ Up arrow ]key pressed>
   <if><not> <key[ Up arrow ]pressed?> >>
          (do some scroll stuff)
   <end>
[/block]

Thanks Dan01!


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#2 2009-02-14 08:39:24

TheSaint
Scratcher
Registered: 2008-11-04
Posts: 1000+

Re: Scroll wheel in offline Scratch tutorial!

Will this work online?

Offline

 

#3 2009-02-14 09:49:58

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Scroll wheel in offline Scratch tutorial!

probally wont, similarly, through a combo of key down and click background you can work ot the right click and left click offLine

Offline

 

#4 2009-02-14 10:08:20

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: Scroll wheel in offline Scratch tutorial!

Thanks for putting the scripting on the forums JSO  big_smile  Very well presented. And thanks for giving credit  wink


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#5 2009-02-14 10:11:03

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: Scroll wheel in offline Scratch tutorial!

TheSaint wrote:

Will this work online?

No it doesn't work online.


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

Board footer