| Package | com.yworks.canvas.input |
| Class | public class CanvasMouseEvent |
| Inheritance | CanvasMouseEvent flash.events.Event |
MouseEvents on the stage and includes additional
properties related to the CanvasComponent.
The wrapped events can be accessed via the mouseEvent property.
| Property | Defined By | ||
|---|---|---|---|
| altKey : Boolean [read-only]
Indicates whether the Alt key is active (true) or inactive (false). | CanvasMouseEvent | ||
| buttonDown : Boolean [read-only]
Indicates whether the primary mouse button is pressed
(true) or not (false). | CanvasMouseEvent | ||
| canvasHit : Boolean [read-only]
Returns whether the event occured inside the bounds of the CanvasComponent. | CanvasMouseEvent | ||
| canvasMouseDown : Boolean [read-only]
Returns whether the last mouse down event occured over the canvas
and there was no mouse up event since then, which means that a mouse drag
was started on the canvas area. | CanvasMouseEvent | ||
| clickCount : int [read-only]
The number of times the mouse button was clicked. | CanvasMouseEvent | ||
| ctrlKey : Boolean [read-only]
Indicates whether the Ctrl key is active (true) or inactive (false). | CanvasMouseEvent | ||
| delta : int [read-only]
Indicates how many lines should be scrolled for each unit the user rotates the mouse wheel. | CanvasMouseEvent | ||
| localX : Number [read-only]
The horizontal coordinate at which the event occurred relative to the containing sprite. | CanvasMouseEvent | ||
| localY : Number [read-only]
The vertical coordinate at which the event occurred relative to the containing sprite. | CanvasMouseEvent | ||
| mouseEvent : MouseEvent [read-only]
The event which has originally triggered sending this event. | CanvasMouseEvent | ||
| shiftKey : Boolean [read-only]
Indicates whether the Shift key is active (true) or inactive (false). | CanvasMouseEvent | ||
| stageX : Number [read-only]
The horizontal coordinate at which the event occurred in global Stage coordinates. | CanvasMouseEvent | ||
| stageY : Number [read-only]
The vertical coordinate at which the event occurred in global Stage coordinates. | CanvasMouseEvent | ||
| viewCoords : IPoint [read-only]
The view coordinates at which the event occurred. | CanvasMouseEvent | ||
| viewX : Number [read-only]
The horizontal view coordinate at which the event occurred. | CanvasMouseEvent | ||
| viewY : Number [read-only]
The vertical view coordinate at which the event occurred. | CanvasMouseEvent | ||
| worldCoords : IPoint [read-only]
The world coordinates at which the event occurred. | CanvasMouseEvent | ||
| worldX : Number [read-only]
The horizontal world coordinate at which the event occurred. | CanvasMouseEvent | ||
| worldY : Number [read-only]
The vertical world coordinate at which the event occurred. | CanvasMouseEvent | ||
| Method | Defined By | ||
|---|---|---|---|
CanvasMouseEvent(evt:MouseEvent, viewCoords:IPoint, worldCoords:IPoint, canvasHit:Boolean, canvasMouseDown:Boolean, clickCount:uint = 0, type:String = null)
Creates a new instance using the given MouseEvent as base. | CanvasMouseEvent | ||
clone():Event [override] | CanvasMouseEvent | ||
| Constant | Defined By | ||
|---|---|---|---|
| CANVAS_MOUSE_CLICK : String = canvasMouseClick [static]
| CanvasMouseEvent | ||
| CANVAS_MOUSE_DOUBLE_CLICK : String = canvasMouseDoubleClick [static]
This event is deprecated. | CanvasMouseEvent | ||
| CANVAS_MOUSE_DOWN : String = canvasMouseDown [static]
| CanvasMouseEvent | ||
| CANVAS_MOUSE_DRAG : String = canvasMouseDrag [static]
| CanvasMouseEvent | ||
| CANVAS_MOUSE_MOVE : String = canvasMouseMove [static]
| CanvasMouseEvent | ||
| CANVAS_MOUSE_NONE : String = canvasMouseNone [static]
| CanvasMouseEvent | ||
| CANVAS_MOUSE_OUT : String = canvasMouseOut [static]
| CanvasMouseEvent | ||
| CANVAS_MOUSE_OVER : String = canvasMouseOver [static]
| CanvasMouseEvent | ||
| CANVAS_MOUSE_UP : String = canvasMouseUp [static]
| CanvasMouseEvent | ||
| CANVAS_MOUSE_WHEEL : String = canvasMouseWheel [static]
| CanvasMouseEvent | ||
| CANVAS_ROLL_OUT : String = canvasRollOut [static]
| CanvasMouseEvent | ||
| CANVAS_ROLL_OVER : String = canvasRollOver [static]
| CanvasMouseEvent | ||
| altKey | property |
altKey:Boolean [read-only]
Indicates whether the Alt key is active (true) or inactive (false).
Supported for Windows operating systems only.
This implementation delegates to the wrapped MouseEvent
public function get altKey():BooleanSee also
| buttonDown | property |
buttonDown:Boolean [read-only]
Indicates whether the primary mouse button is pressed
(true) or not (false).
This implementation delegates to the wrapped MouseEvent
public function get buttonDown():BooleanSee also
| canvasHit | property |
canvasHit:Boolean [read-only]
Returns whether the event occured inside the bounds of the CanvasComponent.
public function get canvasHit():Boolean| canvasMouseDown | property |
canvasMouseDown:Boolean [read-only] Returns whether the last mouse down event occured over the canvas and there was no mouse up event since then, which means that a mouse drag was started on the canvas area.
public function get canvasMouseDown():Boolean| clickCount | property |
clickCount:int [read-only] The number of times the mouse button was clicked.
public function get clickCount():int| ctrlKey | property |
ctrlKey:Boolean [read-only]
Indicates whether the Ctrl key is active (true) or inactive (false).
On Macintosh, indicates whether either the Ctrl key or the Command key is activated.
This implementation delegates to the wrapped MouseEvent
public function get ctrlKey():BooleanSee also
| delta | property |
delta:int [read-only]
Indicates how many lines should be scrolled for each unit the user rotates the mouse wheel.
A positive delta value indicates an upward scroll;
a negative value indicates a downward scroll.
Typical values are 1 to 3, but faster rotation may produce larger values.
This setting depends on the device and operating system and is usually
configurable by the user. This property applies only to the
MouseEvent.mouseWheel event.
This implementation delegates to the wrapped MouseEvent
public function get delta():intSee also
| localX | property |
localX:Number [read-only] The horizontal coordinate at which the event occurred relative to the containing sprite.
This implementation delegates to the wrapped MouseEvent
public function get localX():NumberSee also
| localY | property |
localY:Number [read-only] The vertical coordinate at which the event occurred relative to the containing sprite.
This implementation delegates to the wrapped MouseEvent
public function get localY():NumberSee also
| mouseEvent | property |
mouseEvent:MouseEvent [read-only] The event which has originally triggered sending this event.
public function get mouseEvent():MouseEvent| shiftKey | property |
shiftKey:Boolean [read-only]
Indicates whether the Shift key is active (true) or inactive (false).
This implementation delegates to the wrapped MouseEvent
public function get shiftKey():BooleanSee also
| stageX | property |
stageX:Number [read-only] The horizontal coordinate at which the event occurred in global Stage coordinates.
public function get stageX():NumberSee also
| stageY | property |
stageY:Number [read-only] The vertical coordinate at which the event occurred in global Stage coordinates.
public function get stageY():NumberSee also
| viewCoords | property |
viewCoords:IPoint [read-only] The view coordinates at which the event occurred.
public function get viewCoords():IPoint| viewX | property |
viewX:Number [read-only] The horizontal view coordinate at which the event occurred.
public function get viewX():Number| viewY | property |
viewY:Number [read-only] The vertical view coordinate at which the event occurred.
public function get viewY():Number| worldCoords | property |
worldCoords:IPoint [read-only] The world coordinates at which the event occurred.
public function get worldCoords():IPoint| worldX | property |
worldX:Number [read-only] The horizontal world coordinate at which the event occurred.
public function get worldX():Number| worldY | property |
worldY:Number [read-only] The vertical world coordinate at which the event occurred.
public function get worldY():Number| CanvasMouseEvent | () | Constructor |
public function CanvasMouseEvent(evt:MouseEvent, viewCoords:IPoint, worldCoords:IPoint, canvasHit:Boolean, canvasMouseDown:Boolean, clickCount:uint = 0, type:String = null)
Creates a new instance using the given MouseEvent as base.
evt:MouseEvent — The mouse event which triggered the creation of this event.
| |
viewCoords:IPoint — The view coordinates.
| |
worldCoords:IPoint — The world coordinates.
| |
canvasHit:Boolean — Whether the mouse is over the canvas.
| |
canvasMouseDown:Boolean — Whether the last mouse down event occured over the canvas and there was no mouse up event since then.
| |
clickCount:uint (default = 0) — The number of times the mouse button was clicked.
| |
type:String (default = null) — The type of the event. If none is given, the type will be determined using the MouseEvent's type.
|
| clone | () | method |
override public function clone():EventReturnsEvent |
| CANVAS_MOUSE_CLICK | Constant |
public static const CANVAS_MOUSE_CLICK:String = canvasMouseClick
| CANVAS_MOUSE_DOUBLE_CLICK | Constant |
public static const CANVAS_MOUSE_DOUBLE_CLICK:String = canvasMouseDoubleClickThis event is deprecated. Please use CANVAS_MOUSE_CLICK and the event's clickCount property instead.
| CANVAS_MOUSE_DOWN | Constant |
public static const CANVAS_MOUSE_DOWN:String = canvasMouseDown
| CANVAS_MOUSE_DRAG | Constant |
public static const CANVAS_MOUSE_DRAG:String = canvasMouseDrag
| CANVAS_MOUSE_MOVE | Constant |
public static const CANVAS_MOUSE_MOVE:String = canvasMouseMove
| CANVAS_MOUSE_NONE | Constant |
public static const CANVAS_MOUSE_NONE:String = canvasMouseNone
| CANVAS_MOUSE_OUT | Constant |
public static const CANVAS_MOUSE_OUT:String = canvasMouseOut
| CANVAS_MOUSE_OVER | Constant |
public static const CANVAS_MOUSE_OVER:String = canvasMouseOver
| CANVAS_MOUSE_UP | Constant |
public static const CANVAS_MOUSE_UP:String = canvasMouseUp
| CANVAS_MOUSE_WHEEL | Constant |
public static const CANVAS_MOUSE_WHEEL:String = canvasMouseWheel
| CANVAS_ROLL_OUT | Constant |
public static const CANVAS_ROLL_OUT:String = canvasRollOut
| CANVAS_ROLL_OVER | Constant |
public static const CANVAS_ROLL_OVER:String = canvasRollOver