Just look at your touch listener on your own and see if you’re paying attention to phases. I think that is the issue.
Tip: I quickly reviewed the long code dump further up, but didn’t immediately see a function that looked like a touch listener so I bailed on the analysis.
You should use names that are linked to events for easy of debug (for you and others).
e.g. A touch listener function should probably have the word touch in it. For example, I create buttons like this and it is very clear what the touch listeners is when reviewing the code.
local obj = create button code
function obj.touch( self, event )
... body of listener
end
obj:addEventListener('touch')
or I do this sometimes, also easy to find and debug:
-- single listener used by multiple objects
local function onTouch( self, event )
... body of listener
end
local obj1 = create button code
local obj2 = create button code
local obj3 = create button code
obj1.touch = onTouch
obj1:addEventListener('touch')
obj2.touch = onTouch
obj2:addEventListener('touch')
obj2.touch = onTouch
obj2:addEventListener('touch')