Page 1 of 1
swipes
Posted: Thu Dec 30, 2010 5:25 am
by bdtrauma
Does anyone know if finger swipes to move from one card to another are supported in the iOS deployment or is that one of the features 'visual effects' that is not supported yet.
Thanks,
Bert
Re: swipes
Posted: Thu Dec 30, 2010 10:53 am
by splash21
Try something like recording the mouse location on a touchStart then checking the horizontal distance moved on touchMove events. You can initiate the swipe when enough distance has been covered.
JC
Re: swipes
Posted: Sun Jan 02, 2011 3:05 am
by ctflatt
splash21:
What would this code look like?
:Todd
Re: swipes
Posted: Sun Jan 02, 2011 3:00 pm
by splash21
Example stack attached - you can adjust the required timing and distance to initiate the swipe.
P.S. I just checked touch messages (not mouse), so you'll need to run it in the simulator or on a device.
Re: swipes
Posted: Sun Jan 02, 2011 8:24 pm
by bdtrauma
Nice... this is exactly what I need. Great example. Thanks Splash21
Bert
Re: swipes
Posted: Mon Jan 03, 2011 2:58 am
by ctflatt
Most appreciated! Thanks for your time.
Re: swipes
Posted: Thu May 24, 2012 9:46 pm
by pshuster
Your stack does exactly what I need. - it works great THANKS!!!!
Re: swipes
Posted: Mon Sep 09, 2013 3:22 pm
by Mag
Hi splash21, thank you so much for the useful stack.
Anyway often the swipe is implemented in some cases (for example in iPhone Camera app) with the content that follow the fingers (a sort of grab) and, when a certain amount of movement is done or not:
1. the content item backs to original position or
2. go to the next item.
Somebody know how could be implemented it with LC? I would like to use it for browse photos.
Re: swipes
Posted: Tue Sep 17, 2013 4:36 pm
by Mag
Ok, I created this code to simulate a bounce, maybe could be useful to some other
Code: Select all
on mouseUp
put the first item of the loc of image 1 into a
put the second item of the loc of image 1 into b
move image 1 to (a+30,b) in 8 ticks
move image 1 to (a,b) in 14 ticks
end mouseUp