how to make an object continuously move

hey guys

when i click right arrow(which is a display object), then my ball moves right…but when i keep a long touch on right arrow, it doesn’t keep on moving right…so how do i make my object move continuously when long touching a button…like we touched right button, then it should start moving right until and unless and remove my touch.

We  have a tutorial for that:

https://coronalabs.com/blog/2014/02/04/tutorial-continuous-actions-in-corona/

Rob

Thanks sir

You could do something like:

local button local rightTimer local function moveRight() --moves right end local function walkRight() rightTimer = timer.performWithDelay(100, moveRight, -1)--or 0 for the third parameter end button = widget.newButton{ onEvent = walkRight }

We  have a tutorial for that:

https://coronalabs.com/blog/2014/02/04/tutorial-continuous-actions-in-corona/

Rob

Thanks sir

You could do something like:

local button local rightTimer local function moveRight() --moves right end local function walkRight() rightTimer = timer.performWithDelay(100, moveRight, -1)--or 0 for the third parameter end button = widget.newButton{ onEvent = walkRight }