limiting the swiping area in Air for IOS
Dear Friends,
iam creating an elearning app. In this I have a menu with 50 buttons. I want to swipe this menu vertically. iam using the following code:
Multitouch.inputMode = MultitouchInputMode.GESTURE;
stage.addEventListener(TransformGestureEvent.GESTURE_SWIPE, fl_SwipeHandler);
function fl_SwipeHandler(event: TransformGestureEvent): void {
switch (event.offsetY) {
// swiped down
case 1:
{
if (menubox.y < 30) {
var myTween1: Tween = new Tween(menubox, "y", Strong.easeOut, menubox.y, menubox.y + 200, 1, true);
}
break;
}
// swiped up
case -1:
{
if (menubox.y > -2200) {
var myTween2: Tween = new Tween(menubox, "y", Strong.easeOut, menubox.y, menubox.y - 200, 1, true);
}
break;
}
}
}
here all are working fine. when I swipe fully to top and bottom, it is coming in staying out of starting area.. I want to make him to stop at bigining of the movielip (initial position of movieclip). how can I limiting top and bottom position...
Thanks in Advance,
Syed Abdul Rahim
