Class Index | File Index

Classes


Class MouseEvent

This is passed as the parameter to onPress, onMouseMove, onMouseUp, onMouseDown, and onClick handlers on DisplayObject instances. By default, mouse events are disabled for performance reasons. In order to enabled them for a specified stage set mouseEventsEnabled to true on your stage instance.
Defined in: MouseEvent.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
MouseEvent(type, stageX, stageY)
Constructs a new MouseEvent instance.
Field Summary
Field Attributes Field Name and Description
 
For events of type "onPress" and "onMouseDown" only you can assign a handler to the onMouseMove property.
 
For events of type "onPress" and "onMouseDown" only you can assign a handler to the onMouseUp property.
 
The mouseX position on the stage.
 
The mouseY position on the stage.
 
The type of mouse event.
Method Summary
Method Attributes Method Name and Description
 
Returns a clone of the MouseEvent instance.
 
Returns a string representation of this object.
Class Detail
MouseEvent(type, stageX, stageY)
Constructs a new MouseEvent instance.
Parameters:
type
The event type.
stageX
The mouseX position relative to the stage.
stageY
The mouseY position relative to the stage.
See:
Stage#mouseEventsEnabled
Field Detail
onMouseMove
For events of type "onPress" and "onMouseDown" only you can assign a handler to the onMouseMove property. This handler will be called every time the mouse is moved until the mouse is released. This is useful for operations like drag and drop.

onMouseUp
For events of type "onPress" and "onMouseDown" only you can assign a handler to the onMouseUp property. This handler will be called a single time when the mouse is released anywhere over the page. This is useful for operations like drag and drop.

stageX
The mouseX position on the stage.

stageY
The mouseY position on the stage.

type
The type of mouse event. This will be the same as the handler it maps to (onPress, onMouseDown, onMouseUp, onMouseMove, or onClick).
Method Detail
clone()
Returns a clone of the MouseEvent instance.

toString()
Returns a string representation of this object.

Documentation generated by JsDoc Toolkit 2.3.2 on Mon Feb 07 2011 16:51:57 GMT-0700 (MST)