Swipe Event Problem
Hi, I am new in Adobe Animate and I am working on a new application. I have two scenes in the second scene. I use the command to move the pictures using my finger and works with me. But in this photo I have a picture 1 and a picture 2 and a picture 3 I move from first to second to third Good but if I am on the first picture and move my finger Back to the second scene and I do not want that I want to keep it for this scene only I use this code :
/* Swipe Event
Swiping the stage executes a function containing your custom code. You can use this event to scroll text in a TextField or change states in your application.
Instructions:
1. Add your custom code on a new line after the lines that say "// Start your custom code" below.
*/
Multitouch.inputMode = MultitouchInputMode.GESTURE;
stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeHandler_2);
function fl_SwipeHandler_2(event:TransformGestureEvent):void
{
switch(event.offsetX)
{
// swiped right
case 1:
{
// Start your custom code
// This example code moves the selected object 20 pixels to the right.
btgn_ww.x += 2048;
// End your custom code
break;
}
// swiped left
case -1:
{
// Start your custom code
// This example code moves the selected object 20 pixels to the left.
btgn_ww.x -= 2048;
// End your custom code
break;
}
}
switch(event.offsetY)
{
// swiped down
case 1:
{
// Start your custom code
// This example code moves the selected object 20 pixels down.
btgn_ww.y += 20;
// End your custom code
break;
}
// swiped up
case -1:
{
// Start your custom code
// This example code moves the selected object 20 pixels up.
btgn_ww.y -= 20;
// End your custom code
break;
}
}
}
