Packagecom.senocular.display.transform
Classpublic class ControlCursor
InheritanceControlCursor Inheritance flash.display.Sprite

Displays control cursors within the TransformTool instance. ControlCursor instances are non-interactive controls that display the cursors of other controls. If not using a ControlCursor, you will need to handle cursors manually using the TransformTool.CURSOR_CHANGED event.



Public Properties
 PropertyDefined By
  offset : Point
An offset from the mouse position to display cursor objects.
ControlCursor
  tool : TransformTool
A reference to the TransformTool instance the control was placed, defined in the ADDED_TO_STAGE event.
ControlCursor
Protected Properties
 PropertyDefined By
  activeTarget : IEventDispatcher
The object from which mouse events are consumed.
ControlCursor
  cursor : DisplayObject
The current cursor being displayed by this control.
ControlCursor
  mouseActive : Boolean = false
Determines whether or not mouse positions are being tracked.
ControlCursor
Public Methods
 MethodDefined By
  
ControlCursor(offset:Point = null)
Constructor for creating new ControlCursor instances.
ControlCursor
Protected Methods
 MethodDefined By
  
activeMouseMove(event:MouseEvent):void
Handler for the MouseEvent.MOUSE_MOVE event.
ControlCursor
  
addedToStage(event:Event):void
Handler for the Event.ADDED_TO_STAGE event.
ControlCursor
  
Clears variables and listeners for tracking the mouse location.
ControlCursor
  
Cleanup steps when defining a new cursor value.
ControlCursor
  
cursorChanged(event:Event):void
Handler for the TransformTool.CURSOR_CHANGED event.
ControlCursor
  
removedFromStage(event:Event):void
Handler for the Event.REMOVED_FROM_STAGE event.
ControlCursor
  
Intializes variables and listeners for tracking the mouse location.
ControlCursor
  
Setup steps when defining a new cursor value.
ControlCursor
  
targetChanged(event:Event):void
Handler for the TransformTool.TARGET_CHANGED event.
ControlCursor
Property Detail
activeTargetproperty
protected var activeTarget:IEventDispatcher

The object from which mouse events are consumed. This would normally be the stage instance, but root may be used if stage is not allowed.

cursorproperty 
cursor:DisplayObject

The current cursor being displayed by this control. Do not confuse this with the cursor property used by other controls that determine what cursor is used when those controls are interacted with. The value of this cursor changes as the Transform Tool is supplied new cursors and dispatches TransformTool.CURSOR_CHANGED events.


Implementation
    protected function get cursor():DisplayObject
    protected function set cursor(value:DisplayObject):void
mouseActiveproperty 
protected var mouseActive:Boolean = false

Determines whether or not mouse positions are being tracked.

offsetproperty 
offset:Point

An offset from the mouse position to display cursor objects.


Implementation
    public function get offset():Point
    public function set offset(value:Point):void
toolproperty 
tool:TransformTool

A reference to the TransformTool instance the control was placed, defined in the ADDED_TO_STAGE event. The control must be a direct child of a TransformTool instance for it to be recognized.


Implementation
    public function get tool():TransformTool
    public function set tool(value:TransformTool):void
Constructor Detail
ControlCursor()Constructor
public function ControlCursor(offset:Point = null)

Constructor for creating new ControlCursor instances.

Parameters
offset:Point (default = null) — An offset from the mouse position to display cursor objects. If not provided, or null, the default is used.
Method Detail
activeMouseMove()method
protected function activeMouseMove(event:MouseEvent):void

Handler for the MouseEvent.MOUSE_MOVE event. MOUSE_MOVE is used to track the location of the mouse on the screen.

Parameters

event:MouseEvent

addedToStage()method 
protected function addedToStage(event:Event):void

Handler for the Event.ADDED_TO_STAGE event. By default, this is used to define the tool reference.

Parameters

event:Event

cleanupActiveMouse()method 
protected function cleanupActiveMouse():void

Clears variables and listeners for tracking the mouse location.

cleanupCursor()method 
protected function cleanupCursor():void

Cleanup steps when defining a new cursor value. You may need to override this method to control the order of operations when adding content to the set cursor setter. This is called before a new cursor value is set.

cursorChanged()method 
protected function cursorChanged(event:Event):void

Handler for the TransformTool.CURSOR_CHANGED event.

Parameters

event:Event

removedFromStage()method 
protected function removedFromStage(event:Event):void

Handler for the Event.REMOVED_FROM_STAGE event. By default, this is used to clear the tool reference.

Parameters

event:Event

setupActiveMouse()method 
protected function setupActiveMouse():void

Intializes variables and listeners for tracking the mouse location.

setupCursor()method 
protected function setupCursor():void

Setup steps when defining a new cursor value. You may need to override this method to control the order of operations when adding content to the set cursor setter. This is called after a new cursor value is set.

targetChanged()method 
protected function targetChanged(event:Event):void

Handler for the TransformTool.TARGET_CHANGED event.

Parameters

event:Event