An event that is dispatched into the event flow whenever mouse events occur.
A MouseEvent is usually generated by a user input device, such as a mouse or a trackball, that uses a pointer.
When nested nodes are involved, mouse events target the deepest possible nested node that is visible in the display list. This node is called the target node. To have a target node's ancestor receive notification of a mouse event, use the corresponding on...() methods:
sprite.onMouseClick.listen(_onMouseClick);
- Inheritance
- Object
- Event
- InputEvent
- MouseEvent
Constants
- CLICK → String
-
"click"
- CONTEXT_MENU → String
-
"contextMenu"
- DOUBLE_CLICK → String
-
"doubleClick"
- MIDDLE_CLICK → String
-
"middleClick"
- MIDDLE_MOUSE_DOWN → String
-
"middleMouseDown"
- MIDDLE_MOUSE_UP → String
-
"middleMouseUp"
- MOUSE_DOWN → String
-
"mouseDown"
- MOUSE_MOVE → String
-
"mouseMove"
- MOUSE_OUT → String
-
"mouseOut"
- MOUSE_OVER → String
-
"mouseOver"
- MOUSE_UP → String
-
"mouseUp"
- MOUSE_WHEEL → String
-
"mouseWheel"
- RIGHT_CLICK → String
-
"rightClick"
- RIGHT_MOUSE_DOWN → String
-
"rightMouseDown"
- RIGHT_MOUSE_UP → String
-
"rightMouseUp"
- ROLL_OUT → String
-
"rollOut"
- ROLL_OVER → String
-
"rollOver"
Constructors
- MouseEvent(String type, bool bubbles, num localX, num localY, num stageX, num stageY, bool altKey, bool ctrlKey, bool shiftKey, num deltaX, num deltaY, bool buttonDown, int clickCount)
-
Creates a new MouseEvent.
Properties
- altKey → bool
-
Indicates whether the Alt key is active (true) or inactive (false).
read-only, inherited - bubbles → bool
-
Indicates whether an event is a bubbling event. If the event can bubble, this value is true; otherwise it is false.
read-only, inherited -
Indicates whether the primary mouse button is pressed (true) or not (false).
read-only - captures → bool
-
Indicates whether an event is a capturing event.
read-only, inherited - clickCount → int
-
Indicates whether or not the mouse down event is part of a multi-click sequence.
read-only - ctrlKey → bool
-
Indicates whether the Ctrl key is active (true) or inactive (false).
read-only, inherited - currentTarget → EventDispatcher
-
The object that is actively processing the Event object with an event listener.
read-only, inherited - deltaX → num
-
The amount that is expected to scroll horizontally.
read-only - deltaY → num
-
The amount that is expected to scroll vertically.
read-only - eventPhase → EventPhase
-
The current phase in the event flow.
read-only, inherited - hashCode → int
-
Get a hash code for this object.
read-only, inherited - isDefaultPrevented → bool
-
read-only, inherited
- isImmediatePropagationStopped → bool
-
Indicates if the propagation of this event has been stopped.
read-only, inherited - isPropagationStopped → bool
-
Indicates if the propagation of this event has been stopped.
read-only, inherited - localX → num
-
The x-coordinate at which the event occurred relative to the containing display object.
read-only, inherited - localY → num
-
The y-coordinate at which the event occurred relative to the containing display object.
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited - shiftKey → bool
-
Indicates whether the Shift key is active (true) or inactive (false).
read-only, inherited - stageX → num
-
The x-coordinate of the input event relative to the stage.
read-only, inherited - stageY → num
-
The y-coordinate of the input event relative to the stage.
read-only, inherited - target → EventDispatcher
-
The event target.
read-only, inherited - type → String
-
The type of event.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
preventDefault(
) → void -
inherited
-
stopImmediatePropagation(
) → void -
Prevents processing of any event listeners in the current node and any subsequent nodes in the event flow.
inherited -
stopPropagation(
) → void -
Prevents processing of any event listeners in nodes subsequent to the current node in the event flow.
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited