Hi guys
I'm trying to figure out how to use
@ar2rsawseen 's GestureEventsEasy class, but can't seem to find any samples.
Would anybody be able to show me, how to for example make a 'swipe right' on a sprite, using this class?
Thank you heaps in advance!
Comments
Available events are:
Event.SINGLE_TAP
Event.DOUBLE_TAP
Event.TRIPLE_TAP
Event.LONG_TAP
Event.SWIPE_DOWN
Event.SWIPE_UP
Event.SWIPE_LEFT
Event.SWIPE_RIGHT
Event.DRAG_START
Event.DRAG_MOVE
Event.DRAG_END
to enable dragging you need to call sprite:setDragging(true)
Thank you for the reply
I've tried doing, that but nothing happens. Here is a sample of my code ...
Thanks again!
When added to a movie clip I seem to get a swipe response when the swipe is started outside of the movie clip, and is released over the movie clip.
Is the class only mean to be used with the stage itself?
Thank you in advance!
Thanks for the reply!
I worked out a way of doing it, by using a mouseDown event as well as the swipe event.
This way I add the swipe listener to the stage and check whether a sprite has been touched.
It's working well
Thank you!
How to detect swipe left/right? Something is wrong in my test code:
I've added "GestureEventEasy.lua" to my project.
In my "main.lua I've added:
This code also doesn't work:
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Guys, what methods/libs do you usually use to detect swipes?
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Guys, why swipes are detected only in the initial scene of SceneManager?
When app starts, on first swipe scene changes to next/current.
But after scene changed, swipe detection does not work (app is working no errors shown, but swipe detection just doesn't work)
First I've added class 'Mells_Gestures.lua'
Then I've added this code to my 'main.lua':
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Now my swipe detection actually works
Thx @antix !
Inside that old topic there was like 3-4 different varians or so
Likes: antix
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
https://deluxepixel.com
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Likes: Apollo14
https://deluxepixel.com
Likes: Apollo14
https://deluxepixel.com
@hgy29 please notice that "special chars" < > are being translated by the forum to html > < (see snippet post above) it's not the first time that it happens, is it some setting in the updated forum? Thanks
Likes: SinisterSoft
https://deluxepixel.com
https://deluxepixel.com
Likes: Apollo14, pie
https://deluxepixel.com
https://deluxepixel.com
Likes: Apollo14
https://deluxepixel.com
p.s. speaking about polishing gideros'website:
I believe that the code in this post - as like as many others around - should be moved to the code snippet section to be easily found later
Likes: Apollo14