Packageflare.vis.controls
Classpublic class ClickControl
InheritanceClickControl Inheritance Control Inheritance flash.events.EventDispatcher

Interactive control for responding to mouse clicks events. Select event listeners can be added to respond to the mouse clicks. This control also allows the number of mouse-clicks (single, double, triple, etc) and maximum delay time between clicks to be configured.

See also

flare.vis.events.SelectionEvent


Public Properties
 PropertyDefined by
  clickDelay : Number
The maximum allowed delay (in milliseconds) between clicks.
ClickControl
 Inheritedfilter : Function
Boolean function indicating the items considered by the control.
Control
  numClicks : uint
The number of clicks needed to trigger a click event.
ClickControl
 Inheritedobject : InteractiveObject
The interactive object this control is attached to.
Control
Public Methods
 MethodDefined by
  
ClickControl(filter:* = null, numClicks:uint = 1, onClick:Function = null, onClear:Function = null)
Creates a new ClickControl.
ClickControl
  
attach(obj:InteractiveObject):void
Attach this control to the given interactive object.
ClickControl
  
detach():InteractiveObject
Detach this control.
ClickControl
Events
 EventSummaryDefined by
    ClickControl
    ClickControl
Property detail
clickDelayproperty
clickDelay:Number  [read-write]

The maximum allowed delay (in milliseconds) between clicks. The delay determines the maximum time interval between a mouse up event and a subsequent mouse down event.

Implementation
    public function get clickDelay():Number
    public function set clickDelay(value:Number):void
numClicksproperty 
public var numClicks:uint

The number of clicks needed to trigger a click event. Setting this value to zero effectively disables the click control.

Constructor detail
ClickControl()constructor
public function ClickControl(filter:* = null, numClicks:uint = 1, onClick:Function = null, onClear:Function = null)

Creates a new ClickControl.

Parameters
filter:* (default = null) — a Boolean-valued filter function indicating which items should trigger hover processing
 
numClicks:uint (default = 1) — the number of clicks
 
onClick:Function (default = null) — an optional SelectionEvent listener for click events
 
onClear:Function (default = null)
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.
Event detail
deselectevent 
Event object type: flare.vis.events.SelectionEvent

selectevent  
Event object type: flare.vis.events.SelectionEvent