Packageflare.vis.controls
Classpublic class DragControl
InheritanceDragControl Inheritance Control Inheritance flash.events.EventDispatcher

Interactive control for dragging items. A DragControl will enable dragging of all Sprites in a container object by clicking and dragging them.



Public Properties
 PropertyDefined by
  activeItem : Sprite
[read-only] The active item currently being dragged.
DragControl
 Inheritedfilter : Function
Boolean function indicating the items considered by the control.
Control
 Inheritedobject : InteractiveObject
The interactive object this control is attached to.
Control
  trackAtFrameRate : Boolean = false
Indicates if drag should be followed at frame rate only.
DragControl
Public Methods
 MethodDefined by
  
DragControl(filter:* = null)
Creates a new DragControl.
DragControl
  
attach(obj:InteractiveObject):void
Attach this control to the given interactive object.
DragControl
  
detach():InteractiveObject
Detach this control.
DragControl
Property detail
activeItemproperty
activeItem:Sprite  [read-only]

The active item currently being dragged.

Implementation
    public function get activeItem():Sprite
trackAtFrameRateproperty 
public var trackAtFrameRate:Boolean = false

Indicates if drag should be followed at frame rate only. If false, drag events can be processed faster than the frame rate, however, this may pre-empt other processing.

Constructor detail
DragControl()constructor
public function DragControl(filter:* = null)

Creates a new DragControl.

Parameters
filter:* (default = null) — a Boolean-valued filter function determining which items should be draggable.
Method detail
attach()method
public override function attach(obj:InteractiveObject):void

Attach this control to the given interactive object. This method will automatically detach if already attached to another object.

Parameters
obj:InteractiveObject — the display object to attach to
detach()method 
public override function detach():InteractiveObject

Detach this control.

Returns
InteractiveObject — the interactive object this control was attached to, or null if this control was not attached.