2012-09-28 26 views
0

我在Actionscript(Adobe Air)上编写代码并尝试在Windows 7上测试触摸事件,但它似乎不起作用。我如何测试它?Actionscript - 如何在Windows中测试触摸事件

this.stage.addEventListener(TransformGestureEvent.GESTURE_SWIPE, onSwipe); 

private function onSwipe(e:TransformGestureEvent):void 
{ 
    trace('touch swipe! ' + e.offsetX); 
} 
+0

您是否尝试过任何其他手势,如平移或缩放?我不完全确定Windows 7上支持GESTURE_SWIPE – ThatSteveGuy

回答

2

我敢肯定,你不能在Windows上做到这一点。至少我从来没有能够做到。

PressAndTapGestureEvent类允许您在启用触摸的设备上处理按下并轻敲手势。

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/PressAndTapGestureEvent.html

测试它在你的手机/平板电脑。

+0

谢谢!在这[视频]上的人(http://active.tutsplus.com/tutorials/actionscript/using-native-multitouch-gestures-in-actionscript-3-0/)通过触摸板来实现,但它是Mac – Dimmduh