different events and multitouch: what is executed?

What happens if several areas are touched at the same time that have different meaning for program execution and multitouch is enabled, like moving an object to the left versus to the right by touching a button?

Does one have to separate such events by specifying “if this button is pressed and not the other one then …”? The examples I looked at just define what is triggered by listener without dealing with listeners that also are active. What is the concept behind that/ how does this work as it should?

Thanks for insight. [import]uid: 109677 topic_id: 22018 reply_id: 322018[/import]

With multitouch you also get for instance

event.target.id  

This differentiates between the touch events. [import]uid: 84637 topic_id: 22018 reply_id: 88082[/import]

ok, but I cannot know event.target.id in advance (when writing the code)? So how to deal with that? Just for example:

I have a “shoot”-button that needs to listen simultaneously with the “move left”-button and the “move right”-button. But what if user presses “move left”-button and the “move right”-button at the same time? In best case nothing would happen, in worst case a crash.

Just wonder how I have to deal with this in my code, I need this multitouch functionality for a program I am currently writing, but am unsure how to correctly handle. [import]uid: 109677 topic_id: 22018 reply_id: 88091[/import]

If they press them at the same time, i predict they would cancel each other out. Crash seems extremely unlikely.

I think the best way to move forward here, is to try it out, see your results, and if you have any issues… pop up some code and I will assist you on getting a nice balance :slight_smile: [import]uid: 84637 topic_id: 22018 reply_id: 88868[/import]