Hi there,
Is it possible to end a touch move while the users touch has not yet lifted..?
My scenario is like this :
User touches -- I handle touchStart
User finger moves -- i am handling the touchMove messages, during the move if the finger moves more than a desired number of pixels i fire off a function from within the touchMove handler.
I want to end the messages for this touchMove and fire the touchEnd, and i dont want to hear any more move messages until the finger is lifted and re-touched so i had thought --
on touchMove
if my arbitrary move has been exceeded then
function myfunctioncall() // blocking
send touchEnd to this card in 10 milliseconds
exit to top
end if
end touchMove
This works but causes unpredictable crashing, so i am certainly doing something wrong here..?
End a touchMove
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
End a touchMove
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
Re: End a touchMove
Gary...
I don't know if this will help, but I've attached a stack that uses the 'touch' commands to swipe. If you have a look at the 'touch' commands in the stack script, you will notice that nothing will happen until a finger swipe has traveled a 100 pixels... whether going from left to right, or right to left... you will notice that nothing will happen if the 'swipe' is less than 100 pixels...
But everything happens in the 'touchMove' handler and I don't have to worry about the 'touchEnd' command'
Dixie
I don't know if this will help, but I've attached a stack that uses the 'touch' commands to swipe. If you have a look at the 'touch' commands in the stack script, you will notice that nothing will happen until a finger swipe has traveled a 100 pixels... whether going from left to right, or right to left... you will notice that nothing will happen if the 'swipe' is less than 100 pixels...
But everything happens in the 'touchMove' handler and I don't have to worry about the 'touchEnd' command'
Dixie
- Attachments
-
- swipes.livecode.zip
- (2.12 KiB) Downloaded 199 times