Smooth Scrolling With The Mousewheel

Blitz3D Forums/Blitz3D Beginners Area/Smooth Scrolling With The Mousewheel

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Is this what you mean?
;-========================-
;-=[Mouse Scroll Wheel	]=-
;-=[Moving Image Program]=-
;-========================-

Const xres=640,yres=480
Graphics xres,yres
SetBuffer BackBuffer()

Global Scroll_Image=CreateImage(xres-100,1000)
	SetBuffer ImageBuffer(Scroll_Image)
		Color 164,000,000
		Rect 100,0,xres-100,yres,1
		
		For Bits=0 To Rnd(200)
			Color Rnd(60,250),Rnd(60,255),Rnd(60,255)
			Rect Rnd(100,xres),Rnd(0,yres),Rnd(4,20),Rnd(4,20)
		Next
	SetBuffer BackBuffer()
	
Global MY#

While Not KeyHit(1)
Cls
	Update_Image_With_Scroll_Wheel()			
Flip
Wend



Function Update_Image_With_Scroll_Wheel()

MY=MY + MouseZSpeed()*10
;-============================-
;-=[Draw And Move The Screen]=-
;-============================-
DrawImage Scroll_Image,0,MY
End Function