0
이 코드를 확장하여이 코드에서 3 개 이상의 뷰로 스 와이프 할 수있는 방법이 있습니까?Android 용 플립형 제스처 플렉스 + AIR 앱
Main.MXML
private function handleSwipe(event:TransformGestureEvent):void
{
var slideViewTransition:SlideViewTransition = new SlideViewTransition();
// Swipe was to the right
if (event.offsetX == 1) {
slideViewTransition.direction = ViewTransitionDirection.RIGHT;
navigator.pushView(PreviousView, null, null, slideViewTransition);
}
// Swipe was to the left
else if (event.offsetX == -1) {
slideViewTransition.direction = ViewTransitionDirection.LEFT;
navigator.pushView(NextView, null, null, slideViewTransition);
}
}
NextView.MXML
import spark.transitions.SlideViewTransition;
import spark.transitions.ViewTransitionDirection;
private function handleSwipe(event:TransformGestureEvent):void
{
var slideViewTransition:SlideViewTransition = new SlideViewTransition();
if (event.offsetX == 1) {
slideViewTransition.direction = ViewTransitionDirection.LEFT;
navigator.pushView(ThreeView, null, null, slideViewTransition);
}
}
감사합니다. – ShaneMul