我有一个类,它扩展了Sprite,并实现了Touchable。
鼠标监听程序可以完美地工作,但触摸不能。
this.addEventListener(MouseEvent.MOUSE_DOWN,_mouseDown);this.addEventListener(TouchEvent.TOUCH_BEGIN,_touchDown);
你知道为什么会发生这种事吗?我目前只有:
void _touchDown(TouchEvent e) {print("touched");},未被调用。我正在使用Chromium和模拟触摸。
发布于 2014-04-07 20:22:15
你有最好的选择来获得触摸事件,否则你总是会得到鼠标事件。这样做:
if (Multitouch.inputMode.supportsTouchEvents) {
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
}https://stackoverflow.com/questions/22890377
复制相似问题