Skip to main content

Overview

Touch triggers fire either when the user’s finger touches the object or when the touch is released from the object. You can choose which state the trigger should fire.

Trigger Properties

State

Set the trigger to fire on Touch Down, Touch Up, or Any:
  • Touch Down: Fires when the user touches down inside the view’s boundary.
  • Touch Up: Fires when the user’s touch leaves the screen after touching down inside the view’s boundary.
  • Any: Fires on both Touch Up & Touch Down.

Number of Touches

Set how many fingers are required to fire the Touch trigger. Choose up to four fingers.
trigger.numberOfTouches
Type: number
Can get the value.

Is Enabled

Set if the trigger should fire when the trigger’s conditions are met.
trigger.isEnabled
Type: boolean
Values:
true = enabled
false = disabled
Can get or set the value.

Expression Editor Properties

Location X

trigger.locationX
Horizontal location of your finger in relation to the object the trigger is on.

Location Y

trigger.locationY
Vertical location of your finger in relation to the object the trigger is on.

Resources

Projects Tutorials

Move an Object to a User's Touch Location Tutorial

I