| Package | starling.events |
| Class | public class TouchData |
| Inheritance | TouchData Object |
This class is purely for internal use of the TouchProcessor.
| Property | Defined By | ||
|---|---|---|---|
| globalX : Number [read-only] The x-position of the touch in stage coordinates. | TouchData | ||
| globalY : Number [read-only] The y-position of the touch in stage coordinates. | TouchData | ||
| height : Number [read-only] Height of the contact area. | TouchData | ||
| id : int [read-only] The identifier of a touch. | TouchData | ||
| phase : String [read-only] The current phase the touch is in. | TouchData | ||
| pressure : Number [read-only] A value between 0.0 and 1.0 indicating force of the contact with the device. | TouchData | ||
| width : Number [read-only] Width of the contact area. | TouchData | ||
| Method | Defined By | ||
|---|---|---|---|
fromPool(touchID:int, phase:String, globalX:Number, globalY:Number, pressure:Number = 1.0, width:Number = 1.0, height:Number = 1.0):TouchData [static] Creates a new TouchData instance with the given properties or returns one from
the object pool. | TouchData | ||
[static] Moves an instance back into the pool. | TouchData | ||
| globalX | property |
globalX:Number [read-only] The x-position of the touch in stage coordinates.
public function get globalX():Number| globalY | property |
globalY:Number [read-only] The y-position of the touch in stage coordinates.
public function get globalY():Number| height | property |
height:Number [read-only] Height of the contact area. If the device does not support detecting the pressure, the value is 1.0.
public function get height():Number| id | property |
id:int [read-only] The identifier of a touch. '0' for mouse events, an increasing number for touches.
public function get id():int| phase | property |
phase:String [read-only] The current phase the touch is in.
public function get phase():StringSee also
| pressure | property |
pressure:Number [read-only] A value between 0.0 and 1.0 indicating force of the contact with the device. If the device does not support detecting the pressure, the value is 1.0.
public function get pressure():Number| width | property |
width:Number [read-only] Width of the contact area. If the device does not support detecting the pressure, the value is 1.0.
public function get width():Number| fromPool | () | method |
public static function fromPool(touchID:int, phase:String, globalX:Number, globalY:Number, pressure:Number = 1.0, width:Number = 1.0, height:Number = 1.0):TouchDataCreates a new TouchData instance with the given properties or returns one from the object pool.
Parameters
touchID:int | |
phase:String | |
globalX:Number | |
globalY:Number | |
pressure:Number (default = 1.0) | |
width:Number (default = 1.0) | |
height:Number (default = 1.0) |
TouchData |
| toPool | () | method |
public static function toPool(rawTouch:TouchData):voidMoves an instance back into the pool.
Parameters
rawTouch:TouchData |