Hi Nate, this seemed to have gotten posted twice, I’ve removed the duplicate post.
To answer your question, if you run this little snippet and watch the console log:
local r = display.newRect(100,100,100,100) local function b(event) print("b", event.phase) return true end local function a(event) print("a", event.phase) return true end r:addEventListener("touch", a) r:addEventListener("touch", b)
you will see printed:
2013-11-30 15:41:20.880 Corona Simulator[8163:507] a began 2013-11-30 15:41:20.881 Corona Simulator[8163:507] b began 2013-11-30 15:41:20.993 Corona Simulator[8163:507] a ended 2013-11-30 15:41:20.993 Corona Simulator[8163:507] b ended
So it runs the first function first then the second function. But I think it’s important to understand that these are fired asynchronously. That means it’s going to fire the began phase event to A then immediately fire the event to B. It’s very possible that if function A takes a while that function B could fire in the middle of A’s running and depending on what all goes on, it’s possible that the B ended event could come before the A ended event. So you may end up with A began, B began, B ended, A ended.
Rob