I’ve something like this in my code.
[lua]function onTouch(event)
if (event.phase == “began”) then
flag = true;
elseif (event.phase == “ended”) then
flag = false;
end
end
btnTouch:addEventListener(“touch”,onTouch);[/lua]
But if my touch go out the boundary of that btnTouch my event never reach to “ended” phase and thus my flag remains true.
How can I cancel/end my touch event if touch goes out of the border of this button?
Thanks [import]uid: 7995 topic_id: 13593 reply_id: 313593[/import]
[import]uid: 12482 topic_id: 13593 reply_id: 49890[/import]