Language Version : | ActionScript 3.0 |
Product Version : | Portfolio 10.0 |
Runtime Versions : | Flash Player 10.1, AIR 2.0 |
The ClickHandler class is a utility class that allows components to dispatch click events only
when certain time or drag limits are not exceeded.
protected var component:UIComponent
protected var disallowClick:Boolean
protected var listeningForMove:Boolean
protected var listeningForUp:Boolean
protected var singleClickHandler:Function
protected var stageX:Number
protected var stageY:Number
protected var startTimer:Timer
protected var timeLimit:uint
protected var translationLimit:uint
public function ClickHandler(component:UIComponent, singleClickHandler:Function, translationLimit:uint = 5, timeLimit:uint = 0, priority:int = -50)
Constructor.
Parameters | component:UIComponent — The host component (listen to its events)
|
|
| singleClickHandler:Function — The function to call if a single click is detected. The function takes the form: singleClickHandler(e:MouseEvent):void.
|
|
| translationLimit:uint (default = 5 ) — The number of units the user must drag, either horizontally or vertically, before a click event is canceled.
|
|
| timeLimit:uint (default = 0 ) — The number of milliseconds the user must delay before a click event is canceled.
|
|
| priority:int (default = -50 ) — The event priority to use for the mouse event listeners on component.
|
protected function mouseClickHandler(event:MouseEvent):void
Parameters
protected function mouseDownHandler(event:MouseEvent):void
Parameters
protected function mouseMoveHandler(event:MouseEvent):void
Parameters
protected function mouseUpHandler(event:MouseEvent):void
Parameters
public function removeAllListeners():void
Language Version : | ActionScript 3.0 |
Product Version : | Portfolio 10.0 |
Runtime Versions : | Flash Player 10.1, AIR 2.0 |
Removes all event listeners.
protected function timeoutHandler(e:TimerEvent):void
Parameters
Mon Apr 25 2011, 05:54 PM -07:00