First you need to decide what you think the difference between a tap and a touch are. Or better yet define what you think a tap is.
To me, a tap is basically the “ended” phase of a touch. However, that often is not good enough. i.e. What if you want something to happen immediately upon the user touching the screen?
--To me this is the touch equivalent of a tap (ignoring double-tap which can be easily coded) local function onTouch( self, event ) if( event.phase == "ended" ) then print("tapped button") end return true end local button = display.newRect( 100, 100, 100, 100) button.touch = onTouch button:addEventListener("touch")
I know many won’t agree with me here, but the ‘tap’ event is one of those things I wish was never built-in to Corona. 99% of the time (in my opinion) it is almost useless.
The reason I don’t like (and tell folks not to use) ‘tap’ is because I think too many users start their coding journey with tap events and then get wholly confused when it falls short and they have to switch to ‘touch’ events in the middle of coding their games.
i.e. You start off using tap events and life seems simple and good, but as soon as you need to do anything even vaguely sophisticated (detect a hold, detect a drag, detect touches that move off the target then back again, etc.) you have to switch to touch and having started from ‘tap’ this is difficult for many to grok.
So, I encourage folks to bite the bullet and learn how to use these features of touch listeners:
, then when they have solid understanding of the features, come back to their game or app and re-examine the interaction they are trying to make in the context of a touch event and its features.