Dictionary Entry For TouchMove
Sannyasin Brahmanathaswami
brahma at hindu.org
Mon Mar 12 17:39:27 EDT 2018
I have a group control (made up smaller groups) they I want users to scroll vertically. And the sub-groups, which want the user to scroller horizontally. My current thinking is to turn off scrollers until we get swipe direction, and turn them on, "mid-swipe"
simply: how do you know if touchMove is a horizontal or vertical swipe?
in the dictionary, it says (another cryptic entry!)
touchMove pTouchID, pTouchX, pTouchY
Summary
Sent when the point at which the user is touching the screen changes.
Example
on touchMove pTouchID, pX, pY
if pX > lastX then
-- user has moved to the right
end if
end touchMove
where does "lastX" come from? It is not localized as a variable.
Other touch handlers do not record the X,Y coords of touchRelease.
should we
local sLastMouseUp
end touchRelease
put the mouseloc to sLastMouseUp
end touchRelease
on touchMove pTouchID, pX, pY
if pX > (item 1 of sLastMouseUp) then
-- user has moved to the right
end if
end touchMove
But this relative to the last swipe - this is not "runtime" as the dictionary says:
"Handle the touchMove message if you want to perform some action when
the user changes the touch position without ending the touch or if you
want to keep continuous track of the touch position."
BR
More information about the use-livecode
mailing list