[Resolved] SetFocus on multiple objects / tracking touch events after dragging off screen

I’m developing a game and have recently been using setFocus() to track touch events so that if the user drags off screen the cancel/end phase will trigger.

The cancel/ended phases is now triggering but I’m at a huge disadvantage as setting the focus to a block on the begin phase means it will no longer change it’s event.target when I drag over another item.

I tried sending the setFocus() multiple objects but it ignored it altogether.

My specific question, either:

how can I ensure that after setting focus, other specific objects can still accept touch events

or

how can I check to make sure when a player’s finger drags off screen it fires cancel/end without interfering with the current touch game logic.

Thanks, been trying to fix this all day and am googled out.

K [import]uid: 142918 topic_id: 32248 reply_id: 332248[/import]

I figured out how to do it, I posted it on my blog if you’re interested.

http://simplemachine.co/2012/10/detecting-finger-drags-off-screen-while-allowing-multiple-button-touch-events/

K [import]uid: 142918 topic_id: 32248 reply_id: 128331[/import]

I figured out how to do it, I posted it on my blog if you’re interested.

http://simplemachine.co/2012/10/detecting-finger-drags-off-screen-while-allowing-multiple-button-touch-events/

K [import]uid: 142918 topic_id: 32248 reply_id: 128331[/import]

Glad to hear you figured it, great blog post, too. Thanks for updating and sharing :slight_smile:

Peach [import]uid: 52491 topic_id: 32248 reply_id: 128524[/import]

Glad to hear you figured it, great blog post, too. Thanks for updating and sharing :slight_smile:

Peach [import]uid: 52491 topic_id: 32248 reply_id: 128524[/import]