AIR swipe function doesn't work
i'm using swipe function codesnippet, code doesn't work reason, doesn't report error, doesn't work. i've placed code on background mc suggested.
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:
{
mymc.gotoandstop(105);
break;
}
// swiped left
case -1:
{
mymc.gotoandstop(100);
break;
}
}
}
put line in fornt of switch
trace(event.offsetx);
what get?
another point:
every switch condition needs closing default statement.
case 1:
case 2:
default: break;
More discussions in ActionScript 3
adobe
Comments
Post a Comment