Page 1 of 1
Swipe image left and right
Posted: Tue Apr 29, 2014 10:35 am
by michel_bujardet
I have an app where images cover the entire card. Is there a way to move to next or previous card using horizontal swipe ?
I tried this in the image script but it never gets fired :
Code: Select all
on touchMove pTouchID, pX, pY
if pX > lastX then
-- user has moved to the right
answer "moved"
end if
end touchMove
I searched the board but was unsuccessful.
Any help will be appreciated. Thank you in advance.
Re: Swipe image left and right
Posted: Tue Apr 29, 2014 10:39 am
by LCNeil
Hi Mitch,
You're on the right track.
This lesson has a section on implementing swipe gestures -
http://lessons.runrev.com/s/lessons/m/4 ... r-the-ipad
Kind Regards,
Neil Roger
--
RunRev Support Team ~
http://www.runrev.com
——
Re: Swipe image left and right
Posted: Tue Apr 29, 2014 11:35 am
by Dixie
This might help...

Re: Swipe image left and right
Posted: Tue Apr 29, 2014 12:59 pm
by michel_bujardet
Thank you Neil. I had read the lesson but what through me out was that the swipe code was in the stack.
I have moved it to the image, and now messages work

I should be able to figure it out...
Re: Swipe image left and right
Posted: Tue Apr 29, 2014 1:00 pm
by michel_bujardet
Dixie wrote:This might help...

Thank you so much Dixie

Re: Swipe image left and right
Posted: Tue Apr 29, 2014 7:04 pm
by michel_bujardet
I have modified the code in the lesson to simplify it. It works fine with a script in the main stack.
Thank you for your help.