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

Popular posts from this blog

Warning, the Safe Path is not accessible vm3 - Joomla! Forum - community, help and support

uppercase letters in url - Joomla! Forum - community, help and support

Joomla! Update is not offering Joomla 3 - Joomla! Forum - community, help and support