I want to remove touch listener from a single object and want to remove listener from gameloop but the problem is, if i remove touch listener from one object, touch event listener also gets removed from the other objects which includes button also, below are the sample codes. Please try to solve the problem …
Thanks
local obj = {}
local function objListener()
end
for i=1,6 do
obj[i] = display.newImageRect( “obj.png”)
obj[i]:addEventListener( “touch”, objListener )
sceneGroup:insert( obj[i] )
end
obj[1]: removeEventListener(“touch”, objListener)