Hello! I have some problems/questions about registering multitouch events. I’ll describe my scenario first:
I have three rectangles with different colors (redRect, blueRect and greenRect), and several circles with different colors too. When the user touches one of the rectangles, I create a new object (something like a cursor) which can be dragged on the screen. When that cursor hovers each circle, the circle changes its color, but if the cursor leaves the object, it changes to its original color.
Altough multitouch is active, users can only create one cursor at a time, so when the rectangle receives the touch (began) event I remove all listeners on the rectangles, no problem with that.
My problems are:
- If I use :setFocus(cursor,event.id) when creating the cursor, I can drag it on the screen and future touches don’t interfere whit the drag, but my circles do not receive the “moved” touch event.
- If I don’t setFocus on my cursor, circles do receive the event and change their color on hover, but if I move the cursor too fast it loses track of the finger and stops moving.
My question, is there any way to set focus on an object with its event.id to prevent further touches (and be able to fast drag it), and still propagate the event to the objects below?
Note: I need multitouch to be active since other buttons in the scene should be available when you do all this.
I’ve been working on this a few days, but I can’t get a fully working solution, so can anybody help me?
Thank you!