I am working on a game using Corona SDK , I have number of balls to display in game . i have implemented TouchListener to all of ball objects
.
Code is here
local function ballTouchEvent(e)
local touchedBall = e.target
local phase = e.phase
if phase == "began" then
log("Touch began Phase")
elseif phase == "moved" then
log("Moved Phase")
elseif phase == "ended" or phase == "cancelled" then
log("Ended Phase")
end
return true
end
ball:addEventListener("touch",ballTouchEvent)
I want to implement some functionality when user touches on any of shown ball and moves his touch to white background (Place having no Ball) . Can any one guide me how to implement this ? Thanks in advance