How do I make an object move only when I hold the button

Im trying to make a sprite move by holding a button and then making the object stop when I let go. Is there a way that I can achieve this??? Because I have been trying and I can't seem to figure it out.

Use the TouchDown event to start the movement and the TouchUp event to stop it

http://ai2.appinventor.mit.edu/reference/components/userinterface.html#Button

TouchDown()
Indicates that the Button was pressed down.
TouchUp()
Indicates that the Button has been released.

Taifun

1 Like

Here's a movement tutorial: