Comments (2)
Gestouch doesn't stop any events propagation. Everything works just fine.
package {
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.events.TouchEvent;
import org.gestouch.core.Gestouch;
import org.gestouch.events.GestureEvent;
import org.gestouch.extensions.native.NativeDisplayListAdapter;
import org.gestouch.extensions.native.NativeTouchHitTester;
import org.gestouch.gestures.PanGesture;
import org.gestouch.input.NativeInputAdapter;
public class Main extends Sprite {
public function Main() {
Gestouch.inputAdapter = new NativeInputAdapter(stage);
Gestouch.addDisplayListAdapter(DisplayObject, new NativeDisplayListAdapter());
Gestouch.addTouchHitTester(new NativeTouchHitTester(stage));
var pannable:Sprite = new Sprite();
addChild(pannable);
var pan:PanGesture = new PanGesture(pannable);
pan.addEventListener(GestureEvent.GESTURE_BEGAN, onPan);
pan.addEventListener(GestureEvent.GESTURE_CHANGED, onPan);
var child:Sprite = new Sprite();
child.graphics.beginFill(0xCCCCCC);
child.graphics.drawCircle(0, 0, 100);
child.graphics.endFill();
child.addEventListener(MouseEvent.CLICK, onChildTouch);
child.addEventListener(TouchEvent.TOUCH_BEGIN, onChildTouch);
child.addEventListener(TouchEvent.TOUCH_END, onChildTouch);
pannable.addChild(child)
}
private function onPan(event:GestureEvent):void
{
trace("gesture recognized", event);
}
private function onChildTouch(event:Event):void
{
trace("child interactive event", event);
}
}
}
from gestouch.
Weird since it doesn't work to me. I had to implement event tunneling, probably because I use a personal events framework quite complex, it gets in the way somehow. Thank you for your answer.
from gestouch.
Related Issues (20)
- Limit panning in TransformGesture HOT 2
- DoubleTab and zoom HOT 3
- use Gestouch in Normal As3 HOT 1
- Gestouch suddenly stopped working on Windows 10 with latest Animate CC HOT 2
- How can I use gestouch in starling2 and normal swf file with together ? HOT 1
- freerotation behaviour HOT 4
- SwipeGesture and Drag Drop HOT 1
- swipe container and tap with button scaling up HOT 19
- air error HOT 6
- Errors when using swipe gesture with Starling HOT 2
- Starling.dispose() loses Gestouch swipe HOT 3
- Gestouch with Air18 HOT 8
- Gestouch suddenly stops working HOT 7
- example for drag and zoom and rotate. all together with gestouch HOT 10
- Listeners not working in certain circumstances HOT 15
- SingleTap and DoubleTap - suggestions? HOT 3
- TUIO and Starling HOT 2
- Shaky TransformGesture HOT 5
- Dispatch SwipeGesture to repeat Event HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gestouch.