swipes
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: swipes
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
JC
LiveCode Development & Training : http://splash21.com
Re: swipes
splash21:
What would this code look like?
:Todd
What would this code look like?
:Todd
Re: swipes
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.

P.S. I just checked touch messages (not mouse), so you'll need to run it in the simulator or on a device.
- Attachments
-
- swipe.livecode.zip
- Swipe
- (2.25 KiB) Downloaded 526 times
LiveCode Development & Training : http://splash21.com
Re: swipes
Nice... this is exactly what I need. Great example. Thanks Splash21
Bert
Bert
Re: swipes
Most appreciated! Thanks for your time.
Re: swipes
Your stack does exactly what I need. - it works great THANKS!!!!
Re: swipes
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.
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
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