Compare commits

...
This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.

18 commits

Author SHA1 Message Date
Pavel fljot
7d929b23b6 Add some logging 2014-10-23 22:45:45 +03:00
Pavel fljot
3024eccd6e Update Ant build file for debug build 2014-10-23 22:45:32 +03:00
Pavel fljot
523c3a481d Update POM for debug build 2014-10-23 22:45:09 +03:00
Pavel fljot
8d9c8d3bbb Add log utility 2014-10-23 02:10:15 +03:00
Pavel fljot
822f6d7860 Update Touch#toString() 2014-10-23 02:08:32 +03:00
Pavel fljot
51ebd1c4fb Add hasTouchHitTesterOfType() check 2014-07-25 17:30:42 +03:00
Pavel fljot
ca3488b948 Fix naming 2014-07-25 16:13:16 +03:00
Pavel fljot
350b3acea7 Fix "mushroom operator" (because of new compiler bugs) 2014-07-25 15:53:52 +03:00
Pavel fljot
3951bc45de Update README 2014-07-24 17:46:29 +03:00
Pavel fljot
9d6bcb5708 Update README formatting 2014-07-24 01:03:55 +03:00
Pavel fljot
9e0b749a49 Switch README to MarkDown format 2014-07-24 00:29:01 +03:00
Pavel fljot
27049339d3 Update local dependencies (Starling) 2014-07-23 16:43:31 +03:00
Pavel fljot
fdb29695a9 Update Maven dependencies and repositories 2014-07-23 16:41:40 +03:00
Pavel fljot
6ead92f0d1 Remove CloudBees CI in POM
will manually publish binaries to Bintray
2014-07-23 16:40:17 +03:00
Pavel fljot
05e6053387 Minor changes in POM 2014-07-23 16:38:10 +03:00
Pavel fljot
a390c79d46 Sync Ant and Maven project version 2014-07-23 16:27:23 +03:00
Pavel fljot
788dfd576e Minor fix POM 2014-04-06 01:25:42 +03:00
Pavel fljot
6a16a3003c Bump version number to 0.4.8-SNAPSHOT 2013-12-25 21:40:35 +02:00
12 changed files with 260 additions and 83 deletions

View file

@ -1,27 +1,29 @@
h1. Gestouch: multitouch gesture recognition library for Flash (ActionScript) development.
# Gestouch: multitouch gesture recognition library for Flash (ActionScript) development.
Gestouch is a ActionScript (AS3) library that helps you to deal with single- and multitouch gestures for building better NUI (Natural User Interface).
h3. Why? There's already gesture support in Flash/AIR!
### Why? There's already gesture support in Flash/AIR!
Yes, last versions of Flash Player and AIR runtimes have built-in touch and multitouch support, but the gestures support is very poor: only small set of gestures are supported, they depend on OS, they are not customizable in any way, only one can be processed at the same time and, finally, you are forced to use either raw TouchEvents, or gestures (@see http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/ui/Multitouch.html#inputMode).
_Upd:_ With "native way" you also won't get anything out of Stage3D and of custom input like TUIO protocol.
h3. What Gestouch does in short?
### What Gestouch does in short?
Well basically there's 3 distinctive tasks to solve.
# To provide various input. It can be native MouseEvents, TouchEvents or more complex things like custom input via TUIO protocol for your hand-made installation. So what we get here is Touches (touch points).
# To recognize gesture analyzing touches. Each type of Gesture has it's own inner algorithms that ...
# To manage gestures conflicts. As multiple gestures may be recognized simultaneously, we need to be able to control whether it's allowed or some of them should not be recognized (fail).
Well basically there's 3 distinctive tasks to solve:
1. To provide various input. It can be native MouseEvents, TouchEvents or more complex things like custom input via TUIO protocol for your hand-made installation. So what we get here is Touches (touch points).
2. To recognize gesture analyzing touches. Each type of Gesture has it's own inner algorithms that ...
3. To manage gestures conflicts. As multiple gestures may be recognized simultaneously, we need to be able to control whether it's allowed or some of them should not be recognized (fail).
Gestouch solves these 3 tasks.
I was hardly inspired by Apple team, how they solved this (quite recently to my big surprise! I thought they had it right from the beginning) in they Cocoa-touch UIKit framework. Gestouch is very similar in many ways. But I wouldn't call it "direct port" because 1) the whole architecture was implemented based just on conference videos and user documentation 2) flash platform is a different platform with own specialization, needs, etc.
So I want Gestouch to go far beyond that.
Features:
* Pretty neat architecture! Very similar to Apple's UIGestureRecognizers (Cocoa-Touch UIKit)
* Works with any display list hierarchy structures: native DisplayList (pure AS3/Flex/your UI framework), Starling or ND2D (Stage3D) and 3D libs...
* Doesn't require any additional software (may use runtime's build-in touch support)
@ -31,7 +33,7 @@ Features:
h3. Getting Started
### Getting Started
All gestures dispatch (if you listen to!) GestureEvent with the next types:
GestureEvent.GESTURE_STATE_CHANGE
@ -71,23 +73,37 @@ private function onFreeTransform(event:GestureEvent):void
}
</code></pre>
* Check the "Gestouch Examples":http://github.com/fljot/GestouchExamples project for a quick jump-in
* Check the [Gestouch Examples](http://github.com/fljot/GestouchExamples) project for a quick jump-in
* *+Highly recommended+* to watch videos from Apple WWDC conferences as they explain all the concepts and show more or less real-life examples. @see links below
* "Introduction video":http://www.youtube.com/watch?v=NjkmB8rfQjY - my first video, currently outdated
* TODO: wiki
* TODO: wiki?
h3. Advanced usage: Starling, ...
#### Memory Management
To make Gesture object available for Garbage Collector:
1. **Important!** Set gesture target to `null` or call `dispose()` method.
2. Remove all other references you've created (e.g. event listeners).
@see [examples](https://github.com/fljot/GestouchExamples/tree/master/src/org/gestouch/examples/views) for more details.
### Advanced usage: Starling, ...
It is possible to work with [Starling](http://www.starling-framework.org) display objects as well as any other display list hierarchical structures, e.g. other Stage3D frameworks that have display objects hierarchy like [Genome2D](https://github.com/pshtif/Genome2D-AS3) or [ND2D](https://github.com/nulldesign/nd2d) or even 3D libraries.
Recent changes made it possible to work with "Starling":http://www.starling-framework.org display list objects as well as any other display list hierarchical structures, e.g. other Stage3D frameworks that have display objects hierarchy like "ND2D":https://github.com/nulldesign/nd2d or even 3D libraries.
In order to use Gestouch with Starling all you need to do is a bit of bootstrapping:
<pre><code>starling = new Starling(MyStarlingRootClass, stage);
/* setup & start your Starling instance here */
// Gestouch initialization step 1 of 3:
// Initialize native (default) input adapter. Needed for non-DisplayList usage.
Gestouch.inputAdapter ||= new NativeInputAdapter(stage);
if (!Gestouch.inputAdapter)
{
Gestouch.inputAdapter = new NativeInputAdapter(stage);
}
// Gestouch initialization step 2 of 3:
// Register instance of StarlingDisplayListAdapter to be used for objects of type starling.display.DisplayObject.
@ -110,7 +126,7 @@ Now you can register gestures as usual:
h3. Roadmap, TODOs
### Roadmap, TODOs
* "Massive gestures" & Clusters. For bigger form-factor multitouch usage, when gestures must be a bit less about separate fingers but rather touch clusters (massive multitouch)
* -Simulator (for testing multitouch gestures without special devices)- With new architecture it must be relatively easy to create SimulatorInputAdapter
@ -119,36 +135,33 @@ h3. Roadmap, TODOs
h3. News
### News
* "Follow me on Twitter":http://twitter.com/fljot for latest updates
* Don't forget about "issues":https://github.com/fljot/Gestouch/issues section as a good platform for discussions.
* "Follow me on [Twitter](http://twitter.com/fljot) for latest updates
* Don't forget about github [issues](https://github.com/fljot/Gestouch/issues) section as a good platform for discussions.
h3. Contribution, Donations
### Contribution, Donations
Contribute, share. Found it useful, nothing to add? Hire me for some project.
h3. Links
### Links
* "Gestouch Examples":http://github.com/fljot/GestouchExamples
* [Gestouch Examples](http://github.com/fljot/GestouchExamples)
* "Apple WWDC 2011: Making the Most of Multi-Touch on iOS":https://developer.apple.com/videos/wwdc/2011/?id=118
* "Apple WWDC 2010: Simplifying Touch Event Handling with Gesture Recognizers":https://developer.apple.com/videos/wwdc/2010/?id=120
* "Apple WWDC 2010: Advanced Gesture Recognition":https://developer.apple.com/videos/wwdc/2010/?id=121
* "Event Handling Guide for iOS":https://developer.apple.com/library/ios/documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/
* "UIGestureRecognizer Class Reference":https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIGestureRecognizer_Class/
* [Apple WWDC 2011: Making the Most of Multi-Touch on iOS](https://developer.apple.com/videos/wwdc/2011/?id=118)
* [Apple WWDC 2010: Simplifying Touch Event Handling with Gesture Recognizers](https://developer.apple.com/videos/wwdc/2010/?id=120)
* [Apple WWDC 2010: Advanced Gesture Recognition](https://developer.apple.com/videos/wwdc/2010/?id=121)
* [Event Handling Guide for iOS](https://developer.apple.com/library/ios/documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/)
* [UIGestureRecognizer Class Reference](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIGestureRecognizer_Class/)
* "TUIO":http://www.tuio.org
* [TUIO](http://www.tuio.org)
h2. License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
## License
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
See LICENSE file.

View file

@ -23,6 +23,31 @@
<arg value="-external-library-path+=${flexSDK.dir}/frameworks/libs"/>
<!-- Exclude any external classes (such as Starling framework classes) -->
<arg value="-external-library-path+=${libs.dir}"/>
<arg value="-define+=CONFIG::GestouchDebug,false"/>
<arg value="-externs+=org.gestouch.utils:log"/>
<!-- Keep the metatags (Apparat?). -->
<arg value="-keep-as3-metadata+=Abstract"/>
<!-- Boolean mosh pit! -->
<arg value="-incremental=false"/>
<arg value="-static-link-runtime-shared-libraries=true"/>
<arg value="-verbose-stacktraces=true"/>
<arg value="-headless-server=true"/>
</java>
<echo>[compile] Release SWC gestouch-${project.version}.swc created successfully</echo>
</target>
<target name="compile.swc.debug">
<echo>[compile] Compiling release SWC</echo>
<java jar="${flexSDK.dir}/lib/compc.jar" dir="${flexSDK.dir}/frameworks" fork="true" failonerror="true">
<!-- Build our SWC with a versioned name. -->
<arg value="-output=${binrelease.dir}/gestouch-${project.version}.swc"/>
<!-- We want all the org package classes in the SWC being built. -->
<arg value="-include-sources=${src.dir}"/>
<!-- Exclude Flex Framework classes (some mx events comes from binding). -->
<arg value="-external-library-path+=${flexSDK.dir}/frameworks/libs"/>
<!-- Exclude any external classes (such as Starling framework classes) -->
<arg value="-external-library-path+=${libs.dir}"/>
<arg value="-define+=CONFIG::GestouchDebug,true"/>
<!-- Keep the metatags (Apparat?). -->
<arg value="-keep-as3-metadata+=Abstract"/>
<!-- Boolean mosh pit! -->
@ -51,6 +76,7 @@
<arg line="-output ${asdoc.dir}"/>
<arg value="-keep-xml=true"/>
<arg value="-skip-xsl=true"/>
<arg value="-define+=CONFIG::GestouchDebug,false"/>
<arg line="-window-title 'Gestouch ${project.version}'"/>
<arg line="-main-title 'Gestouch ${project.version}'"/>
<arg line="-footer 'Gestouch - http://github.com/fljot/Gestouch/ - Documentation generated at: ${docgen.time}'"/>

Binary file not shown.

Binary file not shown.

106
pom.xml
View file

@ -7,19 +7,16 @@
<groupId>org.gestouch</groupId>
<artifactId>gestouch</artifactId>
<packaging>swc</packaging>
<version>0.4.7</version>
<version>0.4.8-SNAPSHOT</version>
<name>Gestouch</name>
<properties>
<flexmojos.version>5.0-beta</flexmojos.version>
<flex.sdk.version>4.6.b.23201</flex.sdk.version>
<project.config.debug>false</project.config.debug>
</properties>
<!-- Continuous Integration build hosted by CloudBees -->
<ciManagement>
<system>jenkins</system>
<url>https://fljot.ci.cloudbees.com/job/Gestouch/</url>
</ciManagement>
<issueManagement>
<system>github</system>
<url>https://github.com/fljot/Gestouch/issues</url>
@ -32,6 +29,36 @@
<developerConnection>scm:git:ssh://git@github.com:fljot/Gestouch.git</developerConnection>
</scm>
<profiles>
<profile>
<id>release</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>net.flexmojos.oss</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<externs>
<extern>org.gestouch.utils.log</extern>
</externs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>debug</id>
<properties>
<project.config.debug>true</project.config.debug>
</properties>
</profile>
</profiles>
<build>
<sourceDirectory>src/</sourceDirectory>
@ -42,22 +69,25 @@
<version>${flexmojos.version}</version>
<extensions>true</extensions>
<configuration>
<debug>true</debug>
<storepass/>
<skipTests>true</skipTests>
<skipTest>true</skipTest>
<debug>true</debug>
<verboseStacktraces>true</verboseStacktraces>
<!--
NB! SWC is compiled in debug mode with verbose stacktraces
for better development process.
NB! SWC is compiled in debug mode for better development process.
It's okay and will not affect application performance
UNLESS you are using this library as RSL.
UNLESS you are somehow using this library as RSL.
-->
<keepAs3Metadatas>
<!-- potentially for Apparat. probably useless -->
<keepAs3Metadata>Abstract</keepAs3Metadata>
</keepAs3Metadatas>
<defines>
<property>
<name>CONFIG::GestouchDebug</name>
<value>${project.config.debug}</value>
</property>
</defines>
</configuration>
<dependencies>
<dependency>
@ -84,9 +114,9 @@
<storepass/>
<keepXml>true</keepXml>
<skipXsl>true</skipXsl>
<windowTitle>Gestouch ${project.version}</windowTitle>
<mainTitle>Gestouch ${project.version}</mainTitle>
<footer>Gestouch - http://github.com/fljot/Gestouch/ - Documentation generated at: ${maven.build.timestamp}</footer>
<windowTitle>${project.name} ${project.version}</windowTitle>
<mainTitle>${project.name} ${project.version}</mainTitle>
<footer>${project.name} - http://github.com/fljot/Gestouch/ - Documentation generated at: ${maven.build.timestamp}</footer>
</configuration>
</plugin>
@ -164,27 +194,25 @@
</reporting>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex.sdk.version}</version>
<type>pom</type>
</dependency>
<!--
Note: while this includes the entire flex framework for compilation,
the default for SWCs is external linkage, so nothing from the Flex framework will be added to the final output.
-->
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>${flex.sdk.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>${flex.sdk.version}</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.gamua</groupId>
<artifactId>starling-framework</artifactId>
<version>[1.1,]</version>
<type>swc</type>
</dependency>
<dependency>
<!-- non-modified, yet unofficial -->
<groupId>com.inreflected.forks.com.gamua</groupId>
<artifactId>starling-framework</artifactId>
<version>1.5.1</version>
<type>swc</type>
<!-- scope is "external" by default because of SWC packaging -->
</dependency>
</dependencies>
<repositories>
@ -194,13 +222,13 @@
</repository>
<repository>
<id>starling-repository</id>
<url>http://repository-trylogic.forge.cloudbees.com/snapshot</url>
<id>bintray-flash-repository</id>
<url>http://dl.bintray.com/fljot/flash</url>
<releases>
<enabled>false</enabled>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

View file

@ -45,14 +45,14 @@ package org.gestouch.core
*/
public static function get touchesManager():TouchesManager
{
return _touchesManager ||= new TouchesManager(gesturesManager);
return _touchesManager || (_touchesManager = new TouchesManager(gesturesManager));
}
private static var _gesturesManager:GesturesManager;
public static function get gesturesManager():GesturesManager
{
return _gesturesManager ||= new GesturesManager();
return _gesturesManager || (_gesturesManager = new GesturesManager());
}
@ -65,6 +65,19 @@ package org.gestouch.core
_displayListAdaptersMap[targetClass] = adapter;
}
/**
* Checks whether touch hit-tester of specified type is registered.
* NB! Checks against type (class) without considering subclasses.
*
* @param type The touch hit-tester class
* @return Boolean
*/
public static function hasTouchHitTesterOfType(type:Class):Boolean
{
return touchesManager.gestouch_internal::hasTouchHitTesterOfType(type);
}
public static function addTouchHitTester(hitTester:ITouchHitTester, priority:int = 0):void
@ -75,7 +88,7 @@ package org.gestouch.core
public static function removeTouchHitTester(hitTester:ITouchHitTester):void
{
touchesManager.gestouch_internal::removeInputAdapter(hitTester);
touchesManager.gestouch_internal::removeTouchHitTester(hitTester);
}

View file

@ -48,8 +48,14 @@ package org.gestouch.core
{
_stage = stage;
Gestouch.inputAdapter ||= new NativeInputAdapter(stage);
Gestouch.addTouchHitTester(new NativeTouchHitTester(stage));
if (!Gestouch.inputAdapter)
{
Gestouch.inputAdapter = new NativeInputAdapter(stage);
}
if (!Gestouch.hasTouchHitTesterOfType(NativeTouchHitTester))
{
Gestouch.addTouchHitTester(new NativeTouchHitTester(stage));
}
}

View file

@ -131,7 +131,7 @@ package org.gestouch.core
public function toString():String
{
return "Touch [id: " + id + ", location: " + location + ", ...]";
return "Touch [id: " + id + ", location: " + location + ", target: " + target + ", time: " + time + "]";
}
}
}

View file

@ -5,6 +5,9 @@ package org.gestouch.core
import flash.utils.Dictionary;
import flash.utils.getTimer;
CONFIG::GestouchDebug
import org.gestouch.utils.log;
/**
* @author Pavel fljot
@ -69,9 +72,23 @@ package org.gestouch.core
// Sort hit testers using their priorities
_hitTesters.sort(hitTestersSorter);
}
gestouch_internal function hasTouchHitTesterOfType(type:Class):Boolean
{
for each (var hitTester:ITouchHitTester in _hitTesters)
{
if ((hitTester as Object).constructor == type)
{
return true;
}
}
return false;
}
gestouch_internal function removeInputAdapter(touchHitTester:ITouchHitTester):void
gestouch_internal function removeTouchHitTester(touchHitTester:ITouchHitTester):void
{
if (!touchHitTester)
{
@ -147,6 +164,11 @@ package org.gestouch.core
_touchesMap[touchID] = touch;
_activeTouchesCount++;
CONFIG::GestouchDebug
{
log("Touch begin:", touch);
}
_gesturesManager.onTouchBegin(touch);
@ -165,6 +187,11 @@ package org.gestouch.core
// NB! It appeared that native TOUCH_MOVE event is dispatched also when
// the location is the same, but size has changed. We are only interested
// in location at the moment, so we shall ignore irrelevant calls.
CONFIG::GestouchDebug
{
log("Touch move:", touch);
}
_gesturesManager.onTouchMove(touch);
}
@ -181,6 +208,11 @@ package org.gestouch.core
delete _touchesMap[touchID];
_activeTouchesCount--;
CONFIG::GestouchDebug
{
log("Touch end:", touch);
}
_gesturesManager.onTouchEnd(touch);
@ -198,6 +230,11 @@ package org.gestouch.core
delete _touchesMap[touchID];
_activeTouchesCount--;
CONFIG::GestouchDebug
{
log("Touch begin:", touch);
}
_gesturesManager.onTouchCancel(touch);

View file

@ -12,6 +12,9 @@ package org.gestouch.input
import flash.ui.Multitouch;
import flash.ui.MultitouchInputMode;
CONFIG::GestouchDebug
import org.gestouch.utils.log;
/**
* @author Pavel fljot
@ -67,6 +70,12 @@ package org.gestouch.input
public function init():void
{
CONFIG::GestouchDebug
{
log("Multitouch.supportsTouchEvents:", Multitouch.supportsTouchEvents);
log("_explicitlyHandleTouchEvents:", _explicitlyHandleTouchEvents);
}
if (Multitouch.supportsTouchEvents || _explicitlyHandleTouchEvents)
{
_stage.addEventListener(TouchEvent.TOUCH_BEGIN, touchBeginHandler, true);
@ -145,7 +154,12 @@ package org.gestouch.input
// (to catch on empty stage) phases only
if (event.eventPhase == EventPhase.BUBBLING_PHASE)
return;
CONFIG::GestouchDebug
{
log("Touch begin via touch event:", event);
}
_touchesManager.onTouchBegin(event.touchPointID, event.stageX, event.stageY, event.target as InteractiveObject);
}
@ -156,7 +170,12 @@ package org.gestouch.input
// (to catch on empty stage) phases only
if (event.eventPhase == EventPhase.BUBBLING_PHASE)
return;
CONFIG::GestouchDebug
{
log("Touch move via touch event:", event);
}
_touchesManager.onTouchMove(event.touchPointID, event.stageX, event.stageY);
}
@ -167,6 +186,11 @@ package org.gestouch.input
// (to catch on empty stage) phases only
if (event.eventPhase == EventPhase.BUBBLING_PHASE)
return;
CONFIG::GestouchDebug
{
log("Touch end/cancel via touch event:", event);
}
if (event.hasOwnProperty("isTouchPointCanceled") && event["isTouchPointCanceled"])
{
@ -185,6 +209,11 @@ package org.gestouch.input
// (to catch on empty stage) phases only
if (event.eventPhase == EventPhase.BUBBLING_PHASE)
return;
CONFIG::GestouchDebug
{
log("Touch begin via mouse event:", event);
}
const touchAccepted:Boolean = _touchesManager.onTouchBegin(MOUSE_TOUCH_POINT_ID, event.stageX, event.stageY, event.target as InteractiveObject);
@ -201,7 +230,12 @@ package org.gestouch.input
// (to catch on empty stage) phases only
if (event.eventPhase == EventPhase.BUBBLING_PHASE)
return;
CONFIG::GestouchDebug
{
log("Touch move via mouse event:", event);
}
_touchesManager.onTouchMove(MOUSE_TOUCH_POINT_ID, event.stageX, event.stageY);
}
@ -211,7 +245,12 @@ package org.gestouch.input
// We listen in EventPhase.CAPTURE_PHASE or EventPhase.AT_TARGET
// (to catch on empty stage) phases only
if (event.eventPhase == EventPhase.BUBBLING_PHASE)
return;
return;
CONFIG::GestouchDebug
{
log("Touch end via mouse event:", event);
}
_touchesManager.onTouchEnd(MOUSE_TOUCH_POINT_ID, event.stageX, event.stageY);

View file

@ -0,0 +1,15 @@
package org.gestouch.utils
{
public function log(...args):void
{
// You can switch to custom logging if you really need it for debugging
var tmp:Array = new Error().getStackTrace().split("\n");
tmp = tmp[2].split(" ");
tmp = tmp[1].split("[");
// tmp[0] is a string "class/method()"
args.unshift("[Gestouch]", tmp[0]);
trace.apply(null, args);
}
}

View file

@ -1 +1 @@
project.version = 0.4.6
project.version = 0.4.8-SNAPSHOT