Swipe Menu

4

Attached Files

The following files have been attached to this tutorial:

.capx

swipe-menu.capx

Download now 303.66 KB

Stats

4,407 visits, 6,104 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 23 Feb, 2016. Last updated 19 Feb, 2019

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.66 KB
  • 3 Comments

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