Hello,
I have a quick question. Do yo you know if it's possible to remove all touch events on the screen when pressed a button? Without individually removing them? Is their any one code stopping you from touching anything?
Thanks.
- Michael
Yes that is correct.
Thanks :)
So If i return true the touch events will deactivate?
- Michael
They wont de-activate. it will just stop touch events leaking to objects below them and also prevents over use of a touch event (without return true, your function could be called x number of times per touch rather than the expected behavior)
Ok, thanks guys!
That's exactly what i need to know! :)
There isn't a single line of code to remove all touch listeners, you'd manually remove each one using obj:removeEventListener().
That said, why are you removing them? If it is to prevent users clicking them while you have something going on you could use set focus OR you could put a transparent rectangle over your screen that is hitTestable and put a function on it that simply returns true on touch.
Peach :)