Page 1 of 1

swipe gestures

Posted: Sun Mar 23, 2014 5:09 am
by keram
Hello,

Is it possible to code moving from one card to another using the Android swipe gestures?
If yes, is it possible to also code changing the text display in a text field on one of these cards to the next/previous text line - on that particular card the gesture would not move to the next/previous card, but to the next/previous text line.

Are there any examples anywhere how to do it?

Thanks.

keram

Re: swipe gestures

Posted: Sun Mar 23, 2014 5:28 am
by Simon
Here for swipe;
http://lessons.runrev.com/s/lessons/m/4 ... r-the-ipad
touchStart
touchMove
touchEnd


Simon

Re: swipe gestures

Posted: Sun Mar 23, 2014 10:10 am
by bangkok
A script for card (found on the forum) that works on desktop as well.

Code: Select all

global sStartH
on mouseDown
   put the mouseH into sStartH
end mouseDown

on mouseUp
   if abs(the mouseH - sStartH) > 50 then
       if the mouseH < sStartH then
           goNext
       else
           goPrev
       end if
   end if
end mouseUp

command goNext
	lock screen for visual effect
	go next cd
	unlock screen with visual effect push left very fast
end goNext

command goPrev
	lock screen for visual effect
	go prev cd
	unlock screen with visual effect push right very fast
end goPrev

Re: swipe gestures

Posted: Mon Mar 24, 2014 10:17 am
by keram
Thanks bangkok,

This version seems to be simpler than the one described in the lesson from the link above.
It works well on the desktop. I'll test it on Android in few days.

keram