how to add a event listener to my game aand the functions should be to if i tap on the object i placed in my game it should move upwardsd

_ so my question is to how to write a local function to make my object move on the top of the screen if i tap it…and also how to add event listener and sound in my game _

 

create object:

object = display.newRect(125, 125, 45, 45)

local function move()

   object.y = object.y+50

end

Runtime:addEventListener(“tap”, move)

create object:

object = display.newRect(125, 125, 45, 45)

local function move()

   object.y = object.y+50

end

Runtime:addEventListener(“tap”, move)