| 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, i.e.
| 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)
| 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():Boolean
See 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():Boolean
See 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, i.e. a mouse drag was started on the canvas area.
Implementation public function get canvasMouseDown():Boolean
| clickCount | property |
clickCount:int [read-only]The number of times the mouse button was clicked.
Implementation 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():Boolean
See 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():int
See 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():Number
See 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():Number
See also
| mouseEvent | property |
mouseEvent:MouseEvent [read-only]The event which has originally triggered sending this event.
Implementation 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():Boolean
See also
| stageX | property |
stageX:Number [read-only]The horizontal coordinate at which the event occurred in global Stage coordinates.
This implementation delegates to the wrapped MouseEvent
public function get stageX():Number
See also
| stageY | property |
stageY:Number [read-only]The vertical coordinate at which the event occurred in global Stage coordinates.
This implementation delegates to the wrapped MouseEvent
public function get stageY():Number
See also
| viewCoords | property |
viewCoords:IPoint [read-only]The view coordinates at which the event occurred.
Implementation public function get viewCoords():IPoint
| viewX | property |
viewX:Number [read-only]The horizontal view coordinate at which the event occurred.
Implementation public function get viewX():Number
| viewY | property |
viewY:Number [read-only]The vertical view coordinate at which the event occurred.
Implementation public function get viewY():Number
| worldCoords | property |
worldCoords:IPoint [read-only]The world coordinates at which the event occurred.
Implementation public function get worldCoords():IPoint
| worldX | property |
worldX:Number [read-only]The horizontal world coordinate at which the event occurred.
Implementation public function get worldX():Number
| worldY | property |
worldY:Number [read-only]The vertical world coordinate at which the event occurred.
Implementation 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)Parameters
evt:MouseEvent |
|
viewCoords:IPoint |
|
worldCoords:IPoint |
|
canvasHit:Boolean |
|
canvasMouseDown:Boolean |
|
clickCount:uint (default = 0) |
|
type:String (default = null) |
| 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 = "canvasMouseDoubleClick"This 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"