Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Swipe and Hold gesture — Gideros Forum

Swipe and Hold gesture

MellsMells Guru
edited January 2013 in General questions
Hi,

I am trying to work on the implementation of a Swipe and hold gesture but couldn't find an example in the docs/forum.
It seems a little bit more complex than I thought to get it done right (or maybe I'm making it more complex than it really is).

Can you point me to an example please?

Thank you!
twitter@TheWindApps Artful applications : The Wind Forest. #art #japan #apps

Comments

  • tkhnomantkhnoman Member
    edited January 2013
    for swipe, i get x,y, and os.timer() on Event.TOUCHES_BEGIN and then get the delta on Event.TOUCHES_MOVE:
    local deltaTimer = os.timer() - timerOld
    if deltaTimer  < 0.3 and deltaTimer > 0.1 then
    if xNew - xOld > 50 and yNew - yOld < 50 then
    -- if swipe is 50 to the right and time is more than 0.1 sec and less than 0.3 sec --
    else
    --- ....
    end
    perhaps some modification is needed, i didn't use swipe for diagonal direction.

    for Hold, i think using ENTER_FRAME will fine, haven't tried it yet.
  • @tkhnoman
    Thank you for your help!
    twitter@TheWindApps Artful applications : The Wind Forest. #art #japan #apps
Sign In or Register to comment.