Gestouch only works when displayed on stage

I am trying to use gestouch in my project and I cannot get it to work correctly.

Here's how I compare it:

var tapGesture:TapGesture = new TapGesture(stage); tapGesture.addEventListener(GestureEvent.GESTURE_RECOGNIZED, onTap); 

As you can see, it is displayed on the stage, and so it works ... The class in which I use it extends flash Sprite, and I would like to map the this gesture, but when I do this, gestouch does not seem to work ...

I even tried to put a sprite with the height and height of the scene on top of my view and still does not work ...

Does anyone know what the problem is?

In addition, it may be important to note that I am using ASC2.0, so I had to remove the mario-mushroom operator from this part: Gestouch.inputAdapter ||= new NativeInputAdapter(stage);

+4
source share
1 answer

I (the author of Gestouch) did not test it with ASC 2.0 because it is still under development, but yes, at least he knows that there are problems with the "mushroom operator" and the -inline argument of the compiler.

So the answer is: stick with MXMLC or use sources and find out why it doesn't work.

It is also better to ask questions on Github. I found this almost by accident - Google tells me about the Gestouch mention =)

+2
source

Source: https://habr.com/ru/post/1480485/


All Articles