You are on page 1of 1

Multitouch.inputMode = MultitouchInputMode.

GESTURE;
lembaga.addEventListener(TransformGestureEvent.GESTURE_SWIPE , onSwipe);
function onSwipe (e:TransformGestureEvent):void{
if (e.offsetX == 1) {
//User swiped towards right
lembaga.x += 100;
}
if (e.offsetX == -1) {
//User swiped towards left
lembaga.x -= 100;
}
if (e.offsetY == 1) {
//User swiped towards bottom
lembaga.y += 100;
}
if (e.offsetY == -1) {
//User swiped towards top
lembaga.y -= 100;
}
}

You might also like