2012-09-28 28 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