Mouseevent - Adobe ATMOSPHERE User Manual

Table of Contents

Advertisement

274
APPENDIX E
setFilterOnMouseOver(object)
Causes the specifi ed object (Primitive, Viewpoint Object, or SceneGroup) to return an 'OnMouseOver' mouse
event.
chair = theStage.getPrimitive("chair");
myEventHandler.setFilterOnMouseOver(chair);
setFilterOnMouseMove(object)
Causes the specifi ed object (Primitive, Viewpoint Object, or SceneGroup) to return an 'OnMouseMove' mouse
event.
chair = theStage.getPrimitive("chair");
myEventHandler.setFilterOnMouseMove(chair);
setFilterOnMouseOut(object)
Causes the specifi ed object (Primitive, Viewpoint Object, or SceneGroup) to return an 'OnMouseOut' mouse
event.
chair = theStage.getPrimitive("chair");
myEventHandler.setFilterOnMouseOut(chair);
setFilterEvent()
Specifi es that no events should be fi ltered, and all user mouse events (click, over, out, move) should return the
event object inclusive with all it's properties. Note that using this method will cause the second argument of the
onEvent callback to return 'undefi ned' .
myEventHandler.setFilterEvent();
Copyright ©2002 Adobe Systems Incorporated. All rights reserved.

MouseEvent

A MouseEvent is not an object that you can modify. Rather, it is an object that is returned as the fi rst argument of the
"MouseEventHandler.onEvent(mouseEvent, what)" callback.
When you create a new MouseEventHandler(), you assign a fi ltering method to specify the events to which the
handler should respond. For example, "MyMouseEventHandler.setFilterOnClick(box)" instructs this handler to
respond only when the user clicks on the box (a world object, found in Javascript, and assigned the variable name
"box"). Following the click, the handler responds by triggering the "MyMouseEventHandler.onEvent(mouseEvent,
what)" callback function, and processes the code you have written for this function. The "mouseEvent" described
below is returned as the fi rst argument of this function, and the object under the mouse during the event is returned
as the second argument, "what".

Advertisement

Table of Contents
loading

Table of Contents