Hi all,
I want to detect long touch on mobile device, when long touch pop up a group for user select.
But i try the following code, it does not work :
on mouseDown
// make sure to handle any visual stuff here first, if necessary
wait 300 millisecs with messages
if the mouse is down then
// treat like long mouseClick
else
// treat like short mouseClick
end if
end mouseDown
Please advice, may be I use wrong method
Regards
Terry Ho
How to detect long touch on mobile
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 25
- Joined: Sun Jan 19, 2014 8:53 pm
Re: How to detect long touch on mobile
I was looking for an example as well, Terry, and I found this thread:
http://forums.runrev.com/viewtopic.php? ... hilit=long
I would also like to try the suggestion made there by jacque: save the time on touchStart in a script variable, get the time at touchEnd, compare these times and, if the difference is bigger than a certain amount, generate a message which could start an "on longtouch" handler.
http://forums.runrev.com/viewtopic.php? ... hilit=long
I would also like to try the suggestion made there by jacque: save the time on touchStart in a script variable, get the time at touchEnd, compare these times and, if the difference is bigger than a certain amount, generate a message which could start an "on longtouch" handler.
Re: How to detect long touch on mobile
Hi
Thanks your suggestion on checking on timer, I will try it.
Regards
Terry Ho
Thanks your suggestion on checking on timer, I will try it.
Regards
Terry Ho
Re: How to detect long touch on mobile
Hi Terry,
Here is a stack with two methods using duration of mousedown
Best regards
Jean-Marc
Here is a stack with two methods using duration of mousedown
Best regards
Jean-Marc
- Attachments
-
- CheckingMousedownDuration001.livecode.zip
- (2.63 KiB) Downloaded 231 times
https://alternatic.ch