Code:

...
var mouse_wheel = 0;
mouse_wheel = sys_metrics(75); // see if the mouse has a scrolling wheel or not
while (1)
{
if (mouse_wheel != 0) // wheel present?
{
// then use the wheel to zoom in and out
camera.arc -= 0.1 * mickey.z * time;
}
else // wheel not detected
{
// use the "Y" and "H" keys to zoom in and out
camera.arc -= (key_y - key_h) * time;
}
camera.arc = clamp(camera.arc,20,90); // limit camera.arc to 20..90 degrees
wait (1);
}
...