This is my first tutorial!
To download the capx file : http://www.mediafire.com/download/wxt7n6tt938h85t/swipe+menu.capx
et's get started!
If you want to try the menu :
http://vitogames.ga/swipe
Global Variables
we only need 3 gloabal variables
"swipespeed": the speed that the menu must have after the touch end
"oldX" and "NewX": helps us to calculate "swipespeed"
The Code
First we must create an invisible swiper and we will give it the "drag and drop" behavor
Once the layout starts, we PIN all the menu's levels to the "invisible" swiper
Then, we calculate the "swipespeed" when the touch is in touch
Then, we compare oldX and NewX the know the side the menu must slide after releasing the touch
Then, we must decrease "swipespeed" until it reaches "0" (or else the menu will keep swiping infinitely, and no one wants that ;) )
Finally, we must fix the right and left limits
and we are done :D
hope you like it