Mobile Gestures
Description
Mobile Gestures powers your projects LiveCode for mobile devices with the ability to handle some of the most common gestures. As they are the pinch the double touches and much more.
You must be logged in to leave a review or reply.
Mobile Gestures
library
This mini library is for some of the most common gestures we have on mobile devices.
PinchZoomingUp
message
PinchZoomingUp pPinchId, pRadio
Name | Type | Description |
---|---|---|
pPinchId | A number which uniquely identifies an individual physical pinch action from a sequence of pinch messages. |
|
pRadio | Radius between two of the touches. The one who moves and any other. |
on PinchZoomingUp pPinchId, pRadioOfTouches, pType
if pPinchId is a number then
# Script
end if
end PinchZoomingUp
Handle the PinchZoomingUp message if you want to take any action when the user pinches to zoom on the screen.
The PinchZoomingUp message is sent to the control which received the pinchStart message.
The pPinchID parameter is a number which uniquely identifies a sequence of pinch messages corresponding to an individual, physical pinch action. All such sequences start with a touchStart message, have one or more pinchMove messages and finish with either a pinchEnd.
TouchDoubleUp
message
TouchDoubleUp pTouchId
Name | Type | Description |
---|---|---|
pTouchId | A number which uniquely identifies an individual physical touch action from a sequence of touch messages. |
on TouchDoubleUp pTouchId
if pTouchId is a number then
# Script
end if
end TouchDoubleUp
Handle the TouchDoubleUp message to perform an action when the user double-touchs in mobile.
The TouchDoubleUp message is sent to the control that was double-touchs, or to the card if no control was under the touch point.
Note:This message is not sent if the user touches multiple screen points.
PinchRotate
message
PinchRotate pPinchId, pRotation
Name | Type | Description |
---|---|---|
pPinchId | A number which uniquely identifies an individual physical pinch action from a sequence of pinch messages. |
|
pRotation | It is what has rotated the touches on the screen.. |
on PinchRotate pPinchId, pRadioOfTouches, pType
if pPinchId is a number then
# Script
end if
end PinchRotate
Handle the PinchRotate message if you want to take any action when the user pinches to rotate on the screen.
The PinchRotate message is sent to the control which received the pinchStart message.
The pPinchID parameter is a number which uniquely identifies a sequence of pinch messages corresponding to an individual, physical pinch action. All such sequences start with a touchStart message, have one or more pinchMove messages and finish with either a pinchEnd.
PinchEnd
message
PinchEnd pPinchId
Name | Type | Description |
---|---|---|
pTouchId | A number which uniquely identifies an individual physical pinch action from a sequence of pinch messages. |
on PinchEnd pPinchId
if pPinchId is a number then
# Script
end if
end PinchEnd
Handle the pinchEnd message to perform an action when the user finishes a pinch sequence.
The pinchEnd message is sent to the control that received the pinchStart message that started the touch sequence.
The pPinchId parameter is a number which uniquely identifies a sequence of pinch messages corresponding to an individual, physical touch action. All such sequences start with a PinchStart message, have one or more PinchMove messages and finish with either a PinchEnd message.
PinchZoomingDown
message
PinchZoomingDown pPinchId, pRadio
Name | Type | Description |
---|---|---|
pPinchId | A number which uniquely identifies an individual physical pinch action from a sequence of pinch messages. |
|
pRadio | Radius between two of the touches. The one who moves and any other. |
on PinchZoomingDown pPinchId, pRadioOfTouches, pType
if pPinchId is a number then
# Script
end if
end PinchZoomingDown
Handle the PinchZoomingDown message if you want to take any action when the user pinches to decrease on the screen.
The PinchZoomingDown message is sent to the control which received the pinchStart message.
The pPinchID parameter is a number which uniquely identifies a sequence of pinch messages corresponding to an individual, physical pinch action. All such sequences start with a touchStart message, have one or more pinchMove messages and finish with either a pinchEnd.
TouchDoubleDown
message
TouchDoubleDown pTouchId
Name | Type | Description |
---|---|---|
pTouchId | A number which uniquely identifies an individual physical touch action from a sequence of touch messages. |
on TouchDoubleDown pTouchId
if pTouchId is a number then
# Script
end if
end TouchDoubleDown
Handle The TouchDoubleDown message to perform an action when the user double-touch in mobile.
The TouchDoubleDown message is sent to the control that was double-touchs, or to the card if no control was under the touch point.
Note:This message is not sent if the user touches multiple screen points.
TouchVerySlow
message
TouchVerySlow pTouchID, pDistance, pMoveAddress
Name | Type | Description |
---|---|---|
pTouchID | a number that uniquely identifies an individual physical touch action of a sequence of touch messages. | |
pDistance | the distance traveled by touch. | |
pMoveAddress | Direction in which the touch moves for the last time |
on TouchVerySlow pTouchID, pDistance, pMoveAddress
put "fast touch. touch address is " & pMoveAddress & " with a distance of " & pDistance & "px" into field 1
end TouchVerySlow
Handle the TouchVerySlow message to perform an action when the user touch very slow object.
The TouchVerySlow message is sent to the control that received the touchStart message that initiated the touch sequence.
The pPinchId parameter is a number that uniquely identifies a sequence of touch messages corresponding to an individual physical touch action. All these sequences begin with a touchStart message, have one or more touchMove messages and end with a touchEnd message.
TouchStillDown
message
TouchStillDown pTouchId
Name | Type | Description |
---|---|---|
pTouchId | A number which uniquely identifies an individual physical touch action from a sequence of touch messages. |
on TouchStillDown pTouchId
if pTouchId is a number then
# Script
end if
end TouchStillDown
You can handle the touchStillDown message to perform an action when the user holds the touch long time in screen.
The touchStillDown message is sent to the control that was originally clicked, or to the card if no control was under the touch.
TouchVeryFast
message
TouchVeryFast pTouchID, pDistance, pMoveAddress
Name | Type | Description |
---|---|---|
pTouchID | a number that uniquely identifies an individual physical touch action of a sequence of touch messages. | |
pDistance | the distance traveled by touch. | |
pMoveAddress | Direction in which the touch moves for the last time |
on TouchVeryFast pTouchID, pDistance, pMoveAddress
put "very fast touch. touch address is " & pMoveAddress & " with a distance of " & pDistance & "px" into field 1
end TouchVeryFast
Handle the TouchVeryFast message to perform an action when the user touch very fastan object.
The TouchVeryFast message is sent to the control that received the touchStart message that initiated the touch sequence.
The pPinchId parameter is a number that uniquely identifies a sequence of touch messages corresponding to an individual physical touch action. All these sequences begin with a touchStart message, have one or more touchMove messages and end with a touchEnd message.
PinchStart
message
PinchStart pTouchId
Name | Type | Description |
---|---|---|
pTouchId | A number which uniquely identifies an individual physical pinch action from a sequence of pinch messages. |
on PinchStart pPinchId
if pPinchId is a number then
# Script
end if
end PinchStart
Handle the PinchStart message to perform an action when the user touches the screen, starting the pinch.
The PinchStart message is sent to the control that was touched, or to the card if no control was under the pinch point.
The pPinchId parameter is a number which uniquely identifies a sequence of pinch messages corresponding to an individual, physical touch action. All such sequences start with a PinchStart message, have one or more PinchMove messages and finish with either a PinchEnd message.
No two pinch will have the same pPinchID, and it is possible to have multiple (interleaving) such sequences occurring at once. This allows handling of more than one physical pinch at once.
TouchSlow
message
TouchFast pTouchID, pDistance, pMoveAddress
Name | Type | Description |
---|---|---|
pTouchID | a number that uniquely identifies an individual physical touch action of a sequence of touch messages. | |
pDistance | the distance traveled by touch. | |
pMoveAddress | Direction in which the touch moves for the last time |
on TouchFast pTouchID, pDistance, pMoveAddress
put "fast touch. touch address is " & pMoveAddress & " with a distance of " & pDistance & "px" into field 1
end TouchFast
Handle the TouchFast message to perform an action when the user touch slow object.
The TouchFast message is sent to the control that received the touchStart message that initiated the touch sequence.
The pPinchId parameter is a number that uniquely identifies a sequence of touch messages corresponding to an individual physical touch action. All these sequences begin with a touchStart message, have one or more touchMove messages and end with a touchEnd message.
touchRelease
command
touchRelease pID
TOUCHDOUBLEUP
_DispatchTouchDoubleDown
command
_DispatchTouchDoubleDown pTouchID
Angle between two points
touchEnd
command
touchEnd pTouchID
To know where I come from
TouchFast
message
TouchFast pTouchID, pDistance, pMoveAddress
Name | Type | Description |
---|---|---|
pTouchID | a number that uniquely identifies an individual physical touch action of a sequence of touch messages. | |
pDistance | the distance traveled by touch. | |
pMoveAddress | Direction in which the touch moves for the last time |
on TouchFast pTouchID, pDistance, pMoveAddress
put "fast touch. touch address is " & pMoveAddress & " with a distance of " & pDistance & "px" into field 1
end TouchFast
Handle the TouchFast message to perform an action when the user touch fastan object.
The TouchFast message is sent to the control that received the touchStart message that initiated the touch sequence.
The pPinchId parameter is a number that uniquely identifies a sequence of touch messages corresponding to an individual physical touch action. All these sequences begin with a touchStart message, have one or more touchMove messages and end with a touchEnd message.
PinchMove
message
PinchMove pPinchId, pRadio, pType
Name | Type | Description |
---|---|---|
pPinchId | A number which uniquely identifies an individual physical pinch action from a sequence of pinch messages. |
|
pRadio | Radius between two of the touches. The one who moves and any other. | |
pType | Type of pinch. Up (1), down (0) or simply by moving your fingers the same distance (null). |
on PinchMove pPinchId, pRadioOfTouches, pType
if pPinchId is a number then
# Script
end if
end PinchMove
Handle the pinchMove message if you want to perform some action when the user changes the pinch position without ending the pinch or if you want to keep continuous track of the pinch position.
The pinchMove message is sent to the control which received the pinchStart message.
The pPinchID parameter is a number which uniquely identifies a sequence of pinch messages corresponding to an individual, physical pinch action. All such sequences start with a touchStart message, have one or more pinchMove messages and finish with either a pinchEnd.