0
我正在使用Air Android應用程序,我想基於用戶手勢顯示和隱藏菜單。 如何將手勢識別設置爲特定區域而不是整個舞臺? (例如,從y 0到100像素的區域)如何識別特定區域的滑動手勢?
Multitouch.inputMode = MultitouchInputMode.GESTURE;
stage.addEventListener(TransformGestureEvent.GESTURE_SWIPE , onSwipe);
function onSwipe (e:TransformGestureEvent):void{
if (e.offsetY == 1) {
//User swiped towards bottom
showMenu()
}
else if (e.offsetY == -1) {
//User swiped towards top
hideMenu()
}
}
做,我不能使用精靈,因爲它會覆蓋一個文本字段。有沒有選擇使用xy座標? – Jay
增加了一個新的例子 – Eran