I tried a lot and browsed similar topics on here. They helped insofar as i narrowed the problems down, but it still doesn’t work.
function onCardTouch(self, event)
-- lots of code
end
-- code
function setUpTouchArea\_1()
touch\_area = display.newRect(0,0,\_W,180) -- touch\_area = display.newRect(0,0,480,350)
touch\_area.isVisible = false
touch\_area.isHitTestable = true
touch\_area:setReferencePoint(display.CenterReferencePoint)
touch\_area.x=\_W/2 ; touch\_area.y=\_H - touch\_area.height/2
touch\_area.touch = onCardTouch
touch\_area:addEventListener("touch", touch\_area)
end
-- stop the touch
function t\_pause()
-- in the scope?
print("pausetest touch\_area", touch\_area)
gameClock.pause()
-- both methods do not work!
-- touch\_area.isHitTestable = false
touch\_area:removeEventListener("touch", onCardTouch)
end
right now i check every touch with a an if statement and additional boolean variables. I need to remove it for memory issues as well. [import]uid: 98393 topic_id: 28476 reply_id: 328476[/import]