Package | pq.multitouch |
Class | public class MultiTouch |
Method | Defined by | ||
---|---|---|---|
init(appContainer:DisplayObjectContainer,connectFailCallBack:Function=null):void
[static]
Connect to Multi-Touch Server and initialize.
| MultiTouch | ||
enableGesture(obj:DisplayObject,gesture:BaseGesture,
listener:Function=null,isStopPropagation:Boolean=true):BaseGesture
[static]
Registers a gesture event listener object with a DisplayObject instance so that the DisplayObject instance can receive notification of a certain gesture event.
| MultiTouch | ||
enableMouseSimulation(obj:DisplayObject,isStopPropagation:Boolean=true):BaseGesture
[static]
Registers a MouseSimulation gesture instance with a DisplayObject instance specifically.
| MultiTouch | ||
disableGesture(gesture:BaseGesture):void
[static]
Removes a touch gesture.
| MultiTouch | ||
disableAllGesture(obj:DisplayObject):void
[static]
Removes all touch gestures that are registered to a certain display object.
| MultiTouch | ||
getBlob(touchID:int):Blob
[static]
Get the instance of the global touch blob through touchID.
| MultiTouch | ||
getRelatedBlobs(obj:DisplayObject):Array
[static]
Get the collection of the global touch blobs which are captured by obj.
| MultiTouch | ||
getGlobalBlobs():Array
[static]
Get the collection of the global touch blobs on the stage.
| MultiTouch |
init | () | method |
public static function init(appContainer:DisplayObjectContainer,connectFailCallBack:Function=null,connectedCallBack:Function=null):void
Connect to Multi-Touch Server and initialize.
Parameters
connectFailCallBack:Function — Callback function when multi-touch lib fail to connect with Multi-Touch Server. |
enableGesture | () | method |
public static function enableGesture(obj:DisplayObject,gesture:BaseGesture,
listener:Function=null,isStopPropagation:Boolean=true):BaseGesture
Registers a gesture event listener object with a DisplayObject instance so that the DisplayObject instance can receive notification of a certain gesture event. if listener==null, gesture must be a manipulator, like DragScaleRotate, which handles all gesture function internally. By default, isStopPropagation==true, and the display object will call e.isStopPropagation() after handling with the TouchDown, TouchMove, TouchUp event, otherwise, the TouchDown, TouchMove, TouchUp event will bubble up to the parent of the display object instance.
Parametersobj:DisplayObject — A DisplayObject instance,touch event listener object. |
|
gesture:BaseGesture — Touch gesture instance which handles with basic touch events the display object received. |
|
listener:Function(default = null) — The listener function that processes the gesture event,if listener==null, gesture must be a manipulator, like DragScaleRotate, which handles all gesture function internally. |
|
isStopPropagation:Boolean(default = true) — By default, isStopPropagation==true, and the display object will call e.isStopPropagation() after handling with the TouchDown, TouchMove, TouchUp event, otherwise, the TouchDown, TouchMove, TouchUp event will bubble up to the parent of the display object instance. |
BaseGesture — Touch gesture instance. |
enableMouseSimulation | () | method |
public static function enableMouseSimulation(obj:DisplayObject,isStopPropagation:Boolean=true):BaseGesture
Registers a MouseSimulation gesture instance with a DisplayObject instance specifically.
Parametersobj:DisplayObject — A DisplayObject instance. |
|
isStopPropagation:Boolean(default = true) — By default, isStopPropagation==true, and the display object will call e.isStopPropagation() after handling with the TouchDown, TouchMove, TouchUp event, otherwise, the TouchDown, TouchMove, TouchUp event will bubble up to the parent of the display object instance. |
BaseGesture — MouseSimulation gesture instance. |
disableGesture | () | method |
public static function disableGesture(gesture:BaseGesture):void
Removes a touch gesture.
Parametersgesture:BaseGesture — Touch gesture instance which handles with basic touch events. |
disableAllGesture | () | method |
public static function disableAllGesture(obj:DisplayObject):void
Removes all touch gestures that are registered to a certain display object.
Parametersobj:DisplayObject — A DisplayObject instance. |
getBlob | () | method |
public static function getBlob(touchID:int):Blob
Get the instance of the global touch blob through touchID.
ParameterstouchID:int — int value indicates id of the touch blob. |
Blob — A Blob instance. |
getRelatedBlobs | () | method |
public static function getRelatedBlobs(obj:DisplayObject):Array
Get the collection of the global touch blobs which are captured by obj.
Parametersobj:DisplayObject — DisplayObject instance. |
Array — collection of the touch blobs. |
getGlobalBlobs | () | method |
public static function getGlobalBlobs():Array
Get the collection of the global touch blobs on the stage.
ReturnsArray — collection of the touch blobs. |