Hi Guys!
I am trying to get some code to work where a person holds a button in for 3 seconds on an Android device.
Any ideas would be welcomed greatly!
Googie.
Android Button - Long Press
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Android Button - Long Press
Hi Googie,
out of my head:
Or maybe use "touchstart" and "touchend", you get the picture...
Best
Klaus
out of my head:
Code: Select all
local tPressDuration
on mousedown
put the millisecs into tPressDuration
end mousedown
on mouseup
if the millisecs - tPressDuration >= 3000 then
### do your 3 seconds stuff
else
## "normal" mouseup stuff here, if any
end if
end mouseup
Best
Klaus