how do I get a touch event to hold

Hey Guys!
So I was wondering… I’m trying to do a simple touch event to move an object… It’s kinda works… xD I want to make it so you just have to hold the touch… not move it…, Here’s the code!

[code]
function touchrect:touch(event)
if (event.x > 160) then
bike.x= bike.x+1
end
if (event.x < 160) then
bike.x= bike.x-1
end
end
Runtime:addEventListener(“touch”,touchrect) [import]uid: 95032 topic_id: 21929 reply_id: 321929[/import]

You could use a timer or another Runtime function to move which is cancelled when the event.phase is ended - is that an option here?

Peach :slight_smile: [import]uid: 52491 topic_id: 21929 reply_id: 87248[/import]