mobile-graphic-easel-src-easeljs-events-MouseEvent.js / js
This is passed as the parameter to mousedown, mouseup, mousemove, stagemouseup, stagemousedown, mouseover, mouseout and click events on {{#crossLink "DisplayObject"}}{{/crossLink}} instances. @class MouseEvent @uses EventDispatcher @constructor
parameter: {String} type The event type.
parameter: {Number} stageX The normalized x position relative to the stage.
parameter: {Number} stageY The normalized y position relative to the stage.
parameter: {DisplayObject} target The display object this event relates to. Note that this will be overwritten when the event is dispatched via EventDispatcher.
parameter: {MouseEvent} nativeEvent The native DOM event related to this mouse event.
parameter: {Number} pointerID The unique id for the pointer.
parameter: {Boolean} primary Indicates whether this is the primary pointer in a multitouch environment.
parameter: {Number} rawX The raw x position relative to the stage.
parameter: {Number} rawY The raw y position relative to the stage.
For MouseEvent objects of type "mousedown", mousemove events will be dispatched from the event object until the user releases the mouse anywhere. This enables you to listen to mouse move interactions for the duration of a press, which can be very useful for operations such as drag and drop. See the {{#crossLink "MouseEvent"}}{{/crossLink}} class for a listing of event properties. @event mousemove @since 0.6.0
For MouseEvent objects of type "mousedown", a mouseup event will be dispatched from the event object when the user releases the mouse anywhere. This enables you to listen for a corresponding mouse up from a specific press, which can be very useful for operations such as drag and drop. See the {{#crossLink "MouseEvent"}}{{/crossLink}} class for a listing of event properties. @event mouseup @since 0.6.0
The normalized x position on the stage. This will always be within the range 0 to stage width. @property stageX @type Number
The normalized y position on the stage. This will always be within the range 0 to stage height. @property stageY @type Number
The raw x position relative to the stage. Normally this will be the same as the stageX value, unless stage.mouseMoveOutside is true and the pointer is outside of the stage bounds. @property rawX @type Number
The raw y position relative to the stage. Normally this will be the same as the stageY value, unless stage.mouseMoveOutside is true and the pointer is outside of the stage bounds. @property rawY @type Number
The type of mouse event. This will be the same as the handler it maps to (onPress, onMouseDown, onMouseUp, onMouseMove, or onClick). @property type @type String
The native MouseEvent generated by the browser. The properties and API for this event may differ between browsers. This property will be null if the EaselJS property was not directly generated from a native MouseEvent. @property nativeEvent @type MouseEvent @default null
For events of type "onPress" 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 such as drag and drop. @property onMouseMove @type Function @deprecated In favour of the "mousemove" event. Will be removed in a future version.
For events of type "onPress" only you can assign a handler to the onMouseUp property. This handler will be called every time the mouse is moved until the mouse is released. This is useful for operations such as drag and drop. @property onMouseUp @type Function @deprecated In favour of the "mouseup" event. Will be removed in a future version.
The display object this event relates to. @property target @type DisplayObject @default null
The unique id for the pointer (touch point or cursor). This will be either -1 for the mouse, or the system supplied id value. @property pointerID @type {Number}
Indicates whether this is the primary pointer in a multitouch environment. This will always be true for the mouse. For touch pointers, the first pointer in the current stack will be considered the primary pointer. @property primary @type {Boolean}
Initialization method. @method initialize @protected
Returns a clone of the MouseEvent instance. @method clone
returns: {MouseEvent} a clone of the MouseEvent instance.
Returns a string representation of this object. @method toString
returns: {String} a string representation of the instance.
(C) Æliens 04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.