Swipe Menu

  • 14 favourites

Attached Files

The following files have been attached to this tutorial:

.capx

swipe-menu.capx

Download now 303 KB

Stats

1,974 visits, 2,870 views

Translations

This tutorial hasn't been translated.

Tools

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

.CAPX

swipe-menu.capx

Download now 303 KB
  • 1 Comments

  • Order by
Want to leave a comment? Login or Register an account!