- Top
- Summary
- Constructors
- Class properties
- Instance properties
- Class methods
- Instance methods
- Event handlers
EventMouse
Kind of class: | class |
---|---|
Inherits from: | EventDispatcher < CoreObject |
Version: | 9/11/07 |
Author: | Aaron Clinger |
Classpath: | org.casalib.mouse.EventMouse |
File last modified: | Monday, 01 December 2008, 13:34:40 |
Dispatches mouse events to observers. Should be used instead of
Mouse.addListener
.Example:
-
function onMouseMove():Void { trace("Mouse position is x:" + _root._xmouse + " y:" + _root._ymouse + "."); } var mouseInstance:EventMouse = EventMouse.getInstance(); this.mouseInstance.addEventObserver(this, EventMouse.EVENT_MOUSE_MOVE);
Events broadcasted to listeners:
onMouseDown = function () {}
onMouseMove = function () {}
onMouseUp = function () {}
onMouseWheel = function (delta:Number, scrollTarget:String) {}
Summary
Class properties
- EVENT_MOUSE_DOWN : String
- EVENT_MOUSE_MOVE : String
- EVENT_MOUSE_UP : String
- EVENT_MOUSE_WHEEL : String
Class methods
- getInstance : EventMouse
- isDown : Boolean
- Determines whether the mouse is currently pressed.
Instance methods
Instance methods inherited from EventDispatcher
Instance methods inherited from CoreObject
Class properties
EVENT_MOUSE_DOWN
static EVENT_MOUSE_DOWN:String = 'onMouseDown'
(read,write)
EVENT_MOUSE_MOVE
static EVENT_MOUSE_MOVE:String = 'onMouseMove'
(read,write)
EVENT_MOUSE_UP
static EVENT_MOUSE_UP:String = 'onMouseUp'
(read,write)
EVENT_MOUSE_WHEEL
static EVENT_MOUSE_WHEEL:String = 'onMouseWheel'
(read,write)
Class methods
isDown
static function isDown (
) : Boolean
Determines whether the mouse is currently pressed.
Returns:
- Returns
true
if the mouse is down; otherwisefalse
.