I don't exactly understand what's the difference between tap and touch in Corona. I use both of them and when one touches on an object both listened for event until I wrote this piece of code which changes image when nextButton is touched. It's like when I touched the nextButton, It calls the function two times. However when I change it to tap, it worked smoothly. So can you tell me what is the difference between touch and tap and what was causing trouble when I use touch in this piece of code?
function nextButton:touch(event)
if i==7 then
else
i=i+1
imageObject:removeSelf()
imageObject =display.newImage(imageTable[i]..".jpg")
imageObject.x=_W/2
imageObject.y=_H/2
end
end
nextButton:addEventListener("touch", nextButton)