onMouseWheel Event

Fires when the user rotates the mouse wheel and encounters the wheel’s next notch.

SGWorld.attachEvent(“onLButtonDown”, myOnLButtonDown);

function myOnLButtonDown(flags, deltaZ, x, y)

 

Parameter

Description

flags

Indicates if a virtual key is down

Can be any combination of the following values:

  • Left button = 1

  • Right button = 2

  • Shift = 4

  • Control = 8

  • Middle button = 16

deltaZ

Indicates the distance the mouse wheel rotates

The deltaZ value is expressed in multiples or divisions of WHEEL_DELTA, which is 120

A value less than zero indicates rotating toward the user

A value greater than zero indicates rotating away from the user

The user can reverse this response by changing the wheel settings in the mouse software

x

The x coordinate of the mouse

The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window

y

The y coordinate of the mouse

The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window

Remarks

Returning true informs Skyline Globe Control that the user handled the mouse action and does not wish Skyline Globe Control to respond to the mouse action. When false is returned, Skyline Globe Control handles the mouse action normally.