| Package | com.senocular.display.transform |
| Class | public class ControlInteractive |
| Inheritance | ControlInteractive Control flash.display.Sprite |
| Subclasses | ControlHiddenMultifunction, ControlMove, ControlRegistration, ControlUV |
| Property | Defined By | ||
|---|---|---|---|
| cursor : Cursor
The cursor to be used when interacting with this control. | ControlInteractive | ||
![]() | fillAlpha : Number
The alpha of the color used for filled shapes in dynamically drawn
control graphics. | Control | |
![]() | fillColor : uint
The color to be used for filled shapes in dynamically drawn
control graphics. | Control | |
![]() | lineAlpha : Number
The alpha of the color used for outlines in dynamically drawn
control graphics. | Control | |
![]() | lineColor : uint
The color to be used for outlines in dynamically drawn control
graphics. | Control | |
![]() | lineThickness : Number
The thickness used for outlines in dynamically drawn control
graphics. | Control | |
![]() | tool : TransformTool
A reference to the TransformTool instance the control was placed,
defined in the ADDED_TO_STAGE event. | Control | |
| Property | Defined By | ||
|---|---|---|---|
| activeLocalX : Number
Mouse location in x axis within the target object coordinate space
while the control is being dragged. | ControlInteractive | ||
| activeLocalY : Number
Mouse location in y axis within the target object coordinate space
while the control is being dragged. | ControlInteractive | ||
| activeMouseEvent : MouseEvent
The most recent mouse event received by the activeTarget dispatcher
when consuming mouse events. | ControlInteractive | ||
| activeTarget : IEventDispatcher
The object from which mouse events are consumed. | ControlInteractive | ||
| activeX : Number
Mouse location in x axis within the Transform Tool coordinate space
while the control is being dragged. | ControlInteractive | ||
| activeY : Number
Mouse location in y axis within the Transform Tool coordinate space
while the control is being dragged. | ControlInteractive | ||
| baseLocalMatrixInverted : Matrix
Inverted base matrix used to convert locations in the Transform
Tool coordinate space into locations within the target object
coordinate space. | ControlInteractive | ||
| baseLocalRegistration : Point
Registration point location within the target object coordinate
space when the control is first clicked. | ControlInteractive | ||
| baseLocalX : Number
Mouse location in x axis within the target object coordinate space
after offsets are applied when the control is first clicked. | ControlInteractive | ||
| baseLocalY : Number
Mouse location in y axis within the target object coordinate space
when the control is first clicked. | ControlInteractive | ||
| baseRegistration : Point
Registration point location within the Transform Tool coordinate
space when the control is first clicked. | ControlInteractive | ||
| baseX : Number
Mouse location in x axis within the Transform Tool coordinate space
when the control is first clicked. | ControlInteractive | ||
| baseY : Number
Mouse location in y axis within the Transform Tool coordinate space
when the control is first clicked. | ControlInteractive | ||
| localMouse : Point
Mouse location within the target object coordinate space
when the control is first clicked. | ControlInteractive | ||
| mouse : Point
Mouse location within the Transform Tool coordinate space
when the control is first clicked. | ControlInteractive | ||
| offsetMouse : Point
Offset for the mouse position. | ControlInteractive | ||
| Method | Defined By | ||
|---|---|---|---|
ControlInteractive(cursor:Cursor = null)
Constructor for creating new ControlInteractive instances. | ControlInteractive | ||
![]() | draw():void
Draws the visuals of the control. | Control | |
redraw(event:Event):void [override]
Handler for the TransformTool.REDRAW event. | ControlInteractive | ||
| Method | Defined By | ||
|---|---|---|---|
activeMouseMove(event:MouseEvent):void
Handler for the MouseEvent.MOUSE_MOVE event from the activeTarget
object. | ControlInteractive | ||
activeMouseUp(event:MouseEvent):void
Handler for the MouseEvent.MOUSE_UP event (capture and no capture)
from the activeTarget object. | ControlInteractive | ||
![]() | added(event:Event):void
Handler for the Event.ADDED event (capture). | Control | |
![]() | addedToStage(event:Event):void
Handler for the Event.ADDED_TO_STAGE event. | Control | |
calculateAndUpdate(commit:Boolean = true, enforceNegativeScaling:Boolean = true):void
Calls calculateTransform and update from the parent TransformTool
instance. | ControlInteractive | ||
cleanupActiveMouse():void
Clears variables and listeners for tracking the mouse location. | ControlInteractive | ||
cleanupCursor():void
Cleanup steps when defining a new cursor value. | ControlInteractive | ||
![]() | cleanupTool():void
Cleanup steps when defining a new tool value. | Control | |
mouseDown(event:MouseEvent):void
Handler for the MouseEvent.ROLL_OUT event for the control object. | ControlInteractive | ||
mouseUp(event:MouseEvent):void
Handler for the MouseEvent.MOUSE_UP event for the control object. | ControlInteractive | ||
move():void
Moves the transform using the current mouse position (applied to
postTransform). | ControlInteractive | ||
moveRegistration():void
Moves the registration point using the current mouse position. | ControlInteractive | ||
removedFromStage(event:Event):void [override]
Handler for the Event.REMOVED_FROM_STAGE event. | ControlInteractive | ||
restrict(event:Event):void
Handler for the TransformTool.RESTRICT event. | ControlInteractive | ||
rollOut(event:MouseEvent):void
Handler for the MouseEvent.ROLL_OUT event for the control object. | ControlInteractive | ||
rollOver(event:MouseEvent):void
Handler for the MouseEvent.ROLL_OVER event for the control object. | ControlInteractive | ||
rotate():void
Rotates a transform using the current mouse position (applied to
postTransform). | ControlInteractive | ||
scale():void
Scales the transform along both the x and y axes using the
current mouse position (applied to preTransform). | ControlInteractive | ||
scaleXAxis():void
Scales the transform along the axis using the current mouse
position (applied to preTransform). | ControlInteractive | ||
scaleYAxis():void
Scales the transform along the y axis using the current mouse
position (applied to preTransform). | ControlInteractive | ||
setupActiveMouse():void
Intializes variables and listeners for tracking the mouse location. | ControlInteractive | ||
setupCursor():void
Setup steps when defining a new cursor value. | ControlInteractive | ||
setupTool():void [override]
Setup steps when defining a new tool value. | ControlInteractive | ||
skewXAxis():void
Skews the transform along the x axis using the current mouse
position (applied to preTransform). | ControlInteractive | ||
skewYAxis():void
Skews the transform along the y axis using the current mouse
position (applied to preTransform). | ControlInteractive | ||
targetChanged(event:Event):void [override]
Handler for the TransformTool.TARGET_CHANGED event. | ControlInteractive | ||
uniformScale():void
Scales the transform along both the x and y axes using the
current mouse position in a uniform fashion (applied to
preTransform). | ControlInteractive | ||
updateActiveMouse():void
Updates active references for mouse positions. | ControlInteractive | ||
updateBaseMouse():void
Updates base references for mouse positions. | ControlInteractive | ||
updateBaseReferences():void
Updates the values of the base references. | ControlInteractive | ||
updateMousePositions(event:MouseEvent = null):void
Updates mouse position references from the provided mouse
event. | ControlInteractive | ||
| Constant | Defined By | ||
|---|---|---|---|
| MIN_SCALE_BASE : Number = .1
The minimum distance to allow scaling. | ControlInteractive | ||
| activeLocalX | property |
protected var activeLocalX:NumberMouse location in x axis within the target object coordinate space while the control is being dragged.
| activeLocalY | property |
protected var activeLocalY:NumberMouse location in y axis within the target object coordinate space while the control is being dragged.
| activeMouseEvent | property |
protected var activeMouseEvent:MouseEventThe most recent mouse event received by the activeTarget dispatcher when consuming mouse events.
| activeTarget | property |
protected var activeTarget:IEventDispatcherThe object from which mouse events are consumed. This would normally be the stage instance, but root may be used if stage is not allowed.
| activeX | property |
protected var activeX:NumberMouse location in x axis within the Transform Tool coordinate space while the control is being dragged.
| activeY | property |
protected var activeY:NumberMouse location in y axis within the Transform Tool coordinate space while the control is being dragged.
| baseLocalMatrixInverted | property |
protected var baseLocalMatrixInverted:MatrixInverted base matrix used to convert locations in the Transform Tool coordinate space into locations within the target object coordinate space.
| baseLocalRegistration | property |
protected var baseLocalRegistration:PointRegistration point location within the target object coordinate space when the control is first clicked. Used to derive base values.
| baseLocalX | property |
protected var baseLocalX:NumberMouse location in x axis within the target object coordinate space after offsets are applied when the control is first clicked.
| baseLocalY | property |
protected var baseLocalY:NumberMouse location in y axis within the target object coordinate space when the control is first clicked.
| baseRegistration | property |
protected var baseRegistration:PointRegistration point location within the Transform Tool coordinate space when the control is first clicked. Used to derive base values.
| baseX | property |
protected var baseX:NumberMouse location in x axis within the Transform Tool coordinate space when the control is first clicked.
| baseY | property |
protected var baseY:NumberMouse location in y axis within the Transform Tool coordinate space when the control is first clicked.
| cursor | property |
cursor:CursorThe cursor to be used when interacting with this control.
public function get cursor():Cursor public function set cursor(value:Cursor):void| localMouse | property |
protected var localMouse:PointMouse location within the target object coordinate space when the control is first clicked.
| mouse | property |
protected var mouse:PointMouse location within the Transform Tool coordinate space when the control is first clicked.
| offsetMouse | property |
protected var offsetMouse:PointOffset for the mouse position.
| ControlInteractive | () | Constructor |
public function ControlInteractive(cursor:Cursor = null)Constructor for creating new ControlInteractive instances.
Parameterscursor:Cursor (default = null) — The cursor to be used while interacting with the
control instance.
|
| activeMouseMove | () | method |
protected function activeMouseMove(event:MouseEvent):voidHandler for the MouseEvent.MOUSE_MOVE event from the activeTarget object. This is used to update the active mouse positions.
Parameters
event:MouseEvent |
| activeMouseUp | () | method |
protected function activeMouseUp(event:MouseEvent):voidHandler for the MouseEvent.MOUSE_UP event (capture and no capture) from the activeTarget object. This is used to cleanup mouse handlers and commit the target object. This handler handles both capture and bubble/at-target phases but does not perform its operations in phases other than capture and at-target.
Parameters
event:MouseEvent |
| calculateAndUpdate | () | method |
protected function calculateAndUpdate(commit:Boolean = true, enforceNegativeScaling:Boolean = true):voidCalls calculateTransform and update from the parent TransformTool instance.
Parameters
commit:Boolean (default = true) — The value of commit to be used in
TransformTool.update().
| |
enforceNegativeScaling:Boolean (default = true) — The value of enforceNegativeScaling
to be used in tool.calculateTransform().
|
| cleanupActiveMouse | () | method |
protected function cleanupActiveMouse():voidClears variables and listeners for tracking the mouse location.
| cleanupCursor | () | method |
protected function cleanupCursor():voidCleanup 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.
| mouseDown | () | method |
protected function mouseDown(event:MouseEvent):voidHandler for the MouseEvent.ROLL_OUT event for the control object. This is used to determine if the cursor needs to be changed.
Parameters
event:MouseEvent |
| mouseUp | () | method |
protected function mouseUp(event:MouseEvent):voidHandler for the MouseEvent.MOUSE_UP event for the control object. This is used to set the cursor
Parameters
event:MouseEvent |
| move | () | method |
protected function move():voidMoves the transform using the current mouse position (applied to postTransform).
| moveRegistration | () | method |
protected function moveRegistration():voidMoves the registration point using the current mouse position.
| redraw | () | method |
override public function redraw(event:Event):voidHandler for the TransformTool.REDRAW event. This has no default behavior and is to be overriden by subclasses if needed.
Parameters
event:Event |
| removedFromStage | () | method |
override protected function removedFromStage(event:Event):voidHandler for the Event.REMOVED_FROM_STAGE event. By default, this is used to clear the tool reference.
Parameters
event:Event |
| restrict | () | method |
protected function restrict(event:Event):voidHandler for the TransformTool.RESTRICT event. This has no default behavior and is to be overriden by subclasses if needed.
Parameters
event:Event |
| rollOut | () | method |
protected function rollOut(event:MouseEvent):voidHandler for the MouseEvent.ROLL_OUT event for the control object. This is used to determine if the cursor needs to be changed.
Parameters
event:MouseEvent |
| rollOver | () | method |
protected function rollOver(event:MouseEvent):voidHandler for the MouseEvent.ROLL_OVER event for the control object. This is used to determine if the cursor needs to be changed.
Parameters
event:MouseEvent |
| rotate | () | method |
protected function rotate():voidRotates a transform using the current mouse position (applied to postTransform).
| scale | () | method |
protected function scale():voidScales the transform along both the x and y axes using the current mouse position (applied to preTransform).
| scaleXAxis | () | method |
protected function scaleXAxis():voidScales the transform along the axis using the current mouse position (applied to preTransform).
| scaleYAxis | () | method |
protected function scaleYAxis():voidScales the transform along the y axis using the current mouse position (applied to preTransform).
| setupActiveMouse | () | method |
protected function setupActiveMouse():voidIntializes variables and listeners for tracking the mouse location.
| setupCursor | () | method |
protected function setupCursor():voidSetup 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.
| setupTool | () | method |
override protected function setupTool():voidSetup steps when defining a new tool value. You may need to override this method to control the order of operations when adding content to the set tool setter. This is called after a new tool value is set.
| skewXAxis | () | method |
protected function skewXAxis():voidSkews the transform along the x axis using the current mouse position (applied to preTransform).
| skewYAxis | () | method |
protected function skewYAxis():voidSkews the transform along the y axis using the current mouse position (applied to preTransform).
| targetChanged | () | method |
override protected function targetChanged(event:Event):voidHandler for the TransformTool.TARGET_CHANGED event. This has no default behavior and is to be overriden by subclasses if needed.
Parameters
event:Event |
| uniformScale | () | method |
protected function uniformScale():voidScales the transform along both the x and y axes using the current mouse position in a uniform fashion (applied to preTransform).
| updateActiveMouse | () | method |
protected function updateActiveMouse():voidUpdates active references for mouse positions. These references are used to represent the most up to date state of the mouse position as a control is being interacted with.
| updateBaseMouse | () | method |
protected function updateBaseMouse():voidUpdates base references for mouse positions. These references are used to represent the base state of mouse position when the control was first interacted with.
| updateBaseReferences | () | method |
protected function updateBaseReferences():voidUpdates the values of the base references.
| updateMousePositions | () | method |
protected function updateMousePositions(event:MouseEvent = null):voidUpdates mouse position references from the provided mouse event.
Parameters
event:MouseEvent (default = null) — MouseEvent from which to obtain mouse positions.
|
| MIN_SCALE_BASE | Constant |
public const MIN_SCALE_BASE:Number = .1The minimum distance to allow scaling. if the distance between the mouse position and the registration pont is less than this value, scaling is not permitted.