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

#1 2009-12-26 19:50:02

Reamm
Scratcher
Registered: 2007-11-10
Posts: 100+

Game with mouse scrolling help

I am making a scratch game that features mouse scrolling, but how to I do that? I made my own way to mouse scroll but I need a more advanced way to mouse scroll. Can anyone help?

Offline

 

#2 2009-12-26 22:44:14

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Game with mouse scrolling help

Do you mean the Scroller Wheel? It that, then I'm not sure. If you mean use the mouse to scroll around... That would be hard.

Offline

 

#3 2009-12-27 00:11:06

what-the
Scratcher
Registered: 2009-10-04
Posts: 1000+

Re: Game with mouse scrolling help

Y scrolling
[blocks]
<if><( <mouse y> <>> 170 )>
<change{ y scroll }by( -1
<end>
<if><( <mouse y> <<> -170 )>
<change{ y scroll }by( 1
<end>
[/blocks]
X scrolling
[blocks]
<if><( <mouse x> <>> 230 )>
<change{ x scroll }by( -1
<end>
<if><(  <mouse x><<> -230 )>
<change{ y scroll }by( 1
<end>
[/blocks]
This type of scrolling means when the mouse is right near the edge of the screen the sprite will scroll. You an change the numbers to more or less if you like but this is what I would use. Hope this helps you.


http://imageshack.us/m/64/9034/ddfss.pngMy site
Find someone post count. Click posts under username. Find number of pages. Times that by 40 for min and 60 for max and you have a rough estimate of post count.

Offline

 

Board footer