UNPKG

starling-framework

Version:

A fast, productive library for 2D cross-platform development.

828 lines (827 loc) 79 kB
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Touch | starling-framework</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">starling-framework</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> <input type="checkbox" id="tsd-filter-externals" checked /> <label class="tsd-widget" for="tsd-filter-externals">Externals</label> <input type="checkbox" id="tsd-filter-only-exported" /> <label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../index.html">starling</a> </li> <li> <a href="../modules/starling.events.html">events</a> </li> <li> <a href="starling.events.touch.html">Touch</a> </li> </ul> <h1>Class Touch</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel tsd-comment"> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>A Touch object contains information about the presence or movement of a finger or the mouse on the screen.</p> </div> <p>You receive objects of this type from a TouchEvent. When such an event is triggered, you can query it for all touches that are currently present on the screen. One touch object contains information about a single touch; it always transitions through a series of TouchPhases. Have a look at the TouchPhase class for more information.</p> <p> <strong>The position of a touch</strong></p> <p>You can get the current and previous position in stage coordinates with the corresponding properties. However, you&#39;ll want to have the position in a different coordinate system most of the time. For this reason, there are methods that convert the current and previous touches into the local coordinate system of any object.</p> <p> @see TouchEvent @see TouchPhase</p> </div> </section> <section class="tsd-panel tsd-hierarchy"> <h3>Hierarchy</h3> <ul class="tsd-hierarchy"> <li> <span class="target">Touch</span> </li> </ul> </section> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section tsd-is-external"> <h3>Constructors</h3> <ul class="tsd-index-list"> <li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#constructor" class="tsd-kind-icon">constructor</a></li> </ul> </section> <section class="tsd-index-section tsd-is-external"> <h3>Properties</h3> <ul class="tsd-index-list"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#cancelled" class="tsd-kind-icon">cancelled</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#globalx" class="tsd-kind-icon">globalX</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#globaly" class="tsd-kind-icon">globalY</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#height" class="tsd-kind-icon">height</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#id" class="tsd-kind-icon">id</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#phase" class="tsd-kind-icon">phase</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#pressure" class="tsd-kind-icon">pressure</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#previousglobalx" class="tsd-kind-icon">previous<wbr>GlobalX</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#previousglobaly" class="tsd-kind-icon">previous<wbr>GlobalY</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#tapcount" class="tsd-kind-icon">tap<wbr>Count</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#target" class="tsd-kind-icon">target</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#timestamp" class="tsd-kind-icon">timestamp</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#width" class="tsd-kind-icon">width</a></li> </ul> </section> <section class="tsd-index-section tsd-is-external"> <h3>Methods</h3> <ul class="tsd-index-list"> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#clone" class="tsd-kind-icon">clone</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#getlocation" class="tsd-kind-icon">get<wbr>Location</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#getmovement" class="tsd-kind-icon">get<wbr>Movement</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#getpreviouslocation" class="tsd-kind-icon">get<wbr>Previous<wbr>Location</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#get_cancelled" class="tsd-kind-icon">get_<wbr>cancelled</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#get_globalx" class="tsd-kind-icon">get_<wbr>globalX</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#get_globaly" class="tsd-kind-icon">get_<wbr>globalY</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#get_height" class="tsd-kind-icon">get_<wbr>height</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#get_id" class="tsd-kind-icon">get_<wbr>id</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#get_phase" class="tsd-kind-icon">get_<wbr>phase</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#get_pressure" class="tsd-kind-icon">get_<wbr>pressure</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#get_previousglobalx" class="tsd-kind-icon">get_<wbr>previous<wbr>GlobalX</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#get_previousglobaly" class="tsd-kind-icon">get_<wbr>previous<wbr>GlobalY</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#get_tapcount" class="tsd-kind-icon">get_<wbr>tap<wbr>Count</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#get_target" class="tsd-kind-icon">get_<wbr>target</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#get_timestamp" class="tsd-kind-icon">get_<wbr>timestamp</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#get_width" class="tsd-kind-icon">get_<wbr>width</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#istouching" class="tsd-kind-icon">is<wbr>Touching</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#set_cancelled" class="tsd-kind-icon">set_<wbr>cancelled</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#set_globalx" class="tsd-kind-icon">set_<wbr>globalX</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#set_globaly" class="tsd-kind-icon">set_<wbr>globalY</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#set_height" class="tsd-kind-icon">set_<wbr>height</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#set_phase" class="tsd-kind-icon">set_<wbr>phase</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#set_pressure" class="tsd-kind-icon">set_<wbr>pressure</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#set_tapcount" class="tsd-kind-icon">set_<wbr>tap<wbr>Count</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#set_target" class="tsd-kind-icon">set_<wbr>target</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#set_timestamp" class="tsd-kind-icon">set_<wbr>timestamp</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.events.touch.html#set_width" class="tsd-kind-icon">set_<wbr>width</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.events.touch.html#tostring" class="tsd-kind-icon">to<wbr>String</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-external"> <h2>Constructors</h2> <section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-external"> <a name="constructor" class="tsd-anchor"></a> <h3>constructor</h3> <ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">new <wbr>Touch<span class="tsd-signature-symbol">(</span>id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="starling.events.touch.html" class="tsd-signature-type">Touch</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L27">lib/starling/events/Touch.d.ts:27</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Creates a new Touch object.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>id: <span class="tsd-signature-type">number</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="starling.events.touch.html" class="tsd-signature-type">Touch</a></h4> </li> </ul> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-external"> <h2>Properties</h2> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="cancelled" class="tsd-anchor"></a> <h3>cancelled</h3> <div class="tsd-signature tsd-kind-icon">cancelled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L122">lib/starling/events/Touch.d.ts:122</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Indicates if the touch has been cancelled, which may happen when the app moves into the background (&#39;Event.DEACTIVATE&#39;). @default false</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="globalx" class="tsd-anchor"></a> <h3>globalX</h3> <div class="tsd-signature tsd-kind-icon">globalX<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L71">lib/starling/events/Touch.d.ts:71</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The x-position of the touch in stage coordinates. If you change this value, the previous one will be moved to &quot;previousGlobalX&quot;.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="globaly" class="tsd-anchor"></a> <h3>globalY</h3> <div class="tsd-signature tsd-kind-icon">globalY<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L77">lib/starling/events/Touch.d.ts:77</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The y-position of the touch in stage coordinates. If you change this value, the previous one will be moved to &quot;previousGlobalY&quot;.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="height" class="tsd-anchor"></a> <h3>height</h3> <div class="tsd-signature tsd-kind-icon">height<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L116">lib/starling/events/Touch.d.ts:116</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Height of the contact area. If the device does not support detecting the pressure, the value is 1.0.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="id" class="tsd-anchor"></a> <h3>id</h3> <div class="tsd-signature tsd-kind-icon">id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L58">lib/starling/events/Touch.d.ts:58</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The identifier of a touch. &#39;0&#39; for mouse events, an increasing number for touches.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="phase" class="tsd-anchor"></a> <h3>phase</h3> <div class="tsd-signature tsd-kind-icon">phase<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L88">lib/starling/events/Touch.d.ts:88</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The current phase the touch is in. @see TouchPhase</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="pressure" class="tsd-anchor"></a> <h3>pressure</h3> <div class="tsd-signature tsd-kind-icon">pressure<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L104">lib/starling/events/Touch.d.ts:104</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>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.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="previousglobalx" class="tsd-anchor"></a> <h3>previous<wbr>GlobalX</h3> <div class="tsd-signature tsd-kind-icon">previous<wbr>GlobalX<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L62">lib/starling/events/Touch.d.ts:62</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The previous x-position of the touch in stage coordinates.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="previousglobaly" class="tsd-anchor"></a> <h3>previous<wbr>GlobalY</h3> <div class="tsd-signature tsd-kind-icon">previous<wbr>GlobalY<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L66">lib/starling/events/Touch.d.ts:66</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The previous y-position of the touch in stage coordinates.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="tapcount" class="tsd-anchor"></a> <h3>tap<wbr>Count</h3> <div class="tsd-signature tsd-kind-icon">tap<wbr>Count<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L83">lib/starling/events/Touch.d.ts:83</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The number of taps the finger made in a short amount of time. Use this to detect double-taps / double-clicks, etc.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="target" class="tsd-anchor"></a> <h3>target</h3> <div class="tsd-signature tsd-kind-icon">target<span class="tsd-signature-symbol">:</span> <a href="starling.display.displayobject.html" class="tsd-signature-type">DisplayObject</a></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L93">lib/starling/events/Touch.d.ts:93</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The display object at which the touch occurred.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="timestamp" class="tsd-anchor"></a> <h3>timestamp</h3> <div class="tsd-signature tsd-kind-icon">timestamp<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L98">lib/starling/events/Touch.d.ts:98</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The moment the touch occurred (in seconds since application start).</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="width" class="tsd-anchor"></a> <h3>width</h3> <div class="tsd-signature tsd-kind-icon">width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L110">lib/starling/events/Touch.d.ts:110</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Width of the contact area. If the device does not support detecting the pressure, the value is 1.0.</p> </div> </div> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-external"> <h2>Methods</h2> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="clone" class="tsd-anchor"></a> <h3>clone</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">clone<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="starling.events.touch.html" class="tsd-signature-type">Touch</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L53">lib/starling/events/Touch.d.ts:53</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Creates a clone of the Touch object.</p> </div> </div> <h4 class="tsd-returns-title">Returns <a href="starling.events.touch.html" class="tsd-signature-type">Touch</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="getlocation" class="tsd-anchor"></a> <h3>get<wbr>Location</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get<wbr>Location<span class="tsd-signature-symbol">(</span>space<span class="tsd-signature-symbol">: </span><a href="starling.display.displayobject.html" class="tsd-signature-type">DisplayObject</a>, out<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Point</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Point</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L34">lib/starling/events/Touch.d.ts:34</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Converts the current location of a touch to the local coordinate system of a display object. If you pass an <code>out</code>-point, the result will be stored in this point instead of creating a new object.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>space: <a href="starling.display.displayobject.html" class="tsd-signature-type">DisplayObject</a></h5> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> out: <span class="tsd-signature-type">Point</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Point</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="getmovement" class="tsd-anchor"></a> <h3>get<wbr>Movement</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get<wbr>Movement<span class="tsd-signature-symbol">(</span>space<span class="tsd-signature-symbol">: </span><a href="starling.display.displayobject.html" class="tsd-signature-type">DisplayObject</a>, out<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Point</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Point</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L44">lib/starling/events/Touch.d.ts:44</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Returns the movement of the touch between the current and previous location. If you pass an <code>out</code>-point, the result will be stored in this point instead of creating a new object.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>space: <a href="starling.display.displayobject.html" class="tsd-signature-type">DisplayObject</a></h5> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> out: <span class="tsd-signature-type">Point</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Point</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="getpreviouslocation" class="tsd-anchor"></a> <h3>get<wbr>Previous<wbr>Location</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get<wbr>Previous<wbr>Location<span class="tsd-signature-symbol">(</span>space<span class="tsd-signature-symbol">: </span><a href="starling.display.displayobject.html" class="tsd-signature-type">DisplayObject</a>, out<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Point</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Point</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L39">lib/starling/events/Touch.d.ts:39</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Converts the previous location of a touch to the local coordinate system of a display object. If you pass an <code>out</code>-point, the result will be stored in this point instead of creating a new object.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>space: <a href="starling.display.displayobject.html" class="tsd-signature-type">DisplayObject</a></h5> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> out: <span class="tsd-signature-type">Point</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Point</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_cancelled" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>cancelled</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>cancelled<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L123">lib/starling/events/Touch.d.ts:123</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_globalx" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>globalX</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>globalX<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L72">lib/starling/events/Touch.d.ts:72</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_globaly" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>globalY</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>globalY<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L78">lib/starling/events/Touch.d.ts:78</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_height" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>height</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>height<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L117">lib/starling/events/Touch.d.ts:117</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_id" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>id</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>id<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L59">lib/starling/events/Touch.d.ts:59</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_phase" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>phase</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>phase<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L89">lib/starling/events/Touch.d.ts:89</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_pressure" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>pressure</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>pressure<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L105">lib/starling/events/Touch.d.ts:105</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_previousglobalx" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>previous<wbr>GlobalX</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>previous<wbr>GlobalX<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L63">lib/starling/events/Touch.d.ts:63</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_previousglobaly" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>previous<wbr>GlobalY</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>previous<wbr>GlobalY<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L67">lib/starling/events/Touch.d.ts:67</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_tapcount" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>tap<wbr>Count</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>tap<wbr>Count<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L84">lib/starling/events/Touch.d.ts:84</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_target" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>target</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>target<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="starling.display.displayobject.html" class="tsd-signature-type">DisplayObject</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L94">lib/starling/events/Touch.d.ts:94</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <a href="starling.display.displayobject.html" class="tsd-signature-type">DisplayObject</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_timestamp" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>timestamp</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>timestamp<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L99">lib/starling/events/Touch.d.ts:99</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_width" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>width</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>width<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L111">lib/starling/events/Touch.d.ts:111</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="istouching" class="tsd-anchor"></a> <h3>is<wbr>Touching</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">is<wbr>Touching<span class="tsd-signature-symbol">(</span>target<span class="tsd-signature-symbol">: </span><a href="starling.display.displayobject.html" class="tsd-signature-type">DisplayObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L47">lib/starling/events/Touch.d.ts:47</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Indicates if the target or one of its children is touched.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>target: <a href="starling.display.displayobject.html" class="tsd-signature-type">DisplayObject</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="set_cancelled" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> set_<wbr>cancelled</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">set_<wbr>cancelled<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L124">lib/starling/events/Touch.d.ts:124</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>value: <span class="tsd-signature-type">boolean</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="set_globalx" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> set_<wbr>globalX</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">set_<wbr>globalX<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/Touch.d.ts#L73">lib/starling/events/Touch.d.ts:73</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>value: <span class="tsd-signature-type">number</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="set_globaly" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> set_<wbr>globalY</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">set_<wbr>globalY<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul>