Touch Event Holding

I have an event listener for the touch event which executes a function that requires the x and y coordinates of the touch event, however it only keeps running when I move the touch.

secondFile = require 'secondFolder.secondScript' --Working function foo( event ) secondFile.bar(even.x, event.y) --Working end Runtime:addEventListener( "touch", foo ) --Doesn't work for holding

Thanks in advance.

if(event.phase == "ended")then x = event.x y = event.y functionGoing = false end

The function is only called when the x and y values change.  Start the function when the user starts to tap, and end it with the above code

if(event.phase == "ended")then x = event.x y = event.y functionGoing = false end

The function is only called when the x and y values change.  Start the function when the user starts to tap, and end it with the above code