These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Unusual Behaviour of ScrollWheel

ADB
ADB's picture
Registered: Nov 28 2011
Posts: 20

I have two 3D annotation side by side with same 3D model. I synchronize both of them on ScrollWheelEvent using the ScrollWheelEventHandler. The problem is if I spin the scroll wheel on the acrobat toolbar or on the left hand side bar that shows the bookmark, model tree icons etc. the 3D annotation still zooms in/out. Is there any way to stop this?

My Product Information:
Acrobat Pro 10.1, Windows
JoelGeraci
JoelGeraci's picture
ExpertTeam
Registered: Aug 17 2006
Posts: 80
You're 3D annotation is still active and still receiving events from the scroll wheel. Modify your synchronization code to detect if the mouse is over the annotation with the mouse events isMouseOut and isMouseOver. Basically, when the mouse is not over the annotation, ignore the scroll wheel events.
ADB
ADB's picture
Registered: Nov 28 2011
Posts: 20
Thank you for the reply Joel. I tried getting the values of "mouseEvent.isMouseOut" and "mouseEvent.isMouseOver" whenever a mouse event occurs. my code is as follows

myMouseEvent.target = scene.meshes.getByIndex(0).parent;// Sets the target as the whole 3D annotation window.
myMouseEvent.reportAllTargets = true;
myMouseEvent.onMouseDown = true;
myMouseEvent.onMouseUp = true;
myMouseEvent.onMouseMove = true;
myMouseEvent.onMouseOver = true;
myMouseEvent.onMouseOut = true;

myMouseEvent.onEvent = function(mouseEvent)
{
host.console.println("mouseEvent.isMouseOut = " + mouseEvent.isMouseOut);
host.console.println("mouseEvent.isMouseOver = " + mouseEvent.isMouseOver);

if( mouseEvent.isMouseDown )
{
host.console.println("MouseDown Called....");
} else if( mouseEvent.isMouseUp )
{
host.console.println("MouseUp Called....");
}
else if( mouseEvent.isMouseOver )
{
host.console.println("MouseOver Called....");
} else if( mouseEvent.isMouseOut )
{
host.console.println("MouseOut Called....");
}
}

Now my target is set as the whole 3D annotation window. I checked this by clicking anywhere inside the 3D annotation window and I can get the "mouseEvent.isMouseDown" and "mouseEvent.isMouseUp" values as true. But "mouseEvent.isMouseOut"and "mouseEvent.isMouseOver" are shown to be false every single time whether I am moving my mouse over the 3D annotation or over the 3D model itself and therefore, the last two console.println() statements are never called. Can you please point out where I am going wrong. Your help is greatly appreciated.