HomefieldOfView | SPi-V dev

Navigation

user

Wheel mouse xtra

How can I run Mousewheel Xtra to zoom in/out in SPi-V in Director?

on WheelMouseEvent val
 
  --  if val is greater than 0 then mouse wheel is going forward
  if val > 0 then
    zoomIn member( "_spv" ), -1
  else
    zoomOut member( "_spv" ), 1
  end if
 
end

How to change this code to be able to zoom in/out in panoramas using scrool on a mouse?
Karol

Re: Wheel mouse xtra

You would typically use setProperty() to set the "zoomspeed" property of the "_camera" object:

tell sprite("SPi-V") to setProperty("_camera", "zoomspeed", "0.2")

Be aware that you must reset the zoomspeed back to 0 after a short while, or SPi-V will keep on zooming.

There's a more complex way of doing it that is 'nicer', which involves adding a ramp to your document which sets the "fov" property of the camera directly. But I should not have said that...