air for android app:
buttons at the bottom of the screen, and buttons at the top.
I want to listen for TouchEvent.TOUCH_OVER on all of these buttons.
the bottom buttons are in 1 movieClip container.
I add an event Listener to that 1 movieClip, It works great, only fired if over that container, use a switch statement to see which of the children is over
Now that i add the top button. I’m not sure what is better here.
- add a second listener to that button also.
- OR add the 1 listener to the stage and use a switch statement to see what is over.
If i have the 1 listener, its fired every time you touch anywhere, (do nothing if e.target == stage.)
But on the other hand, i have read sometimes phones don’t hear the events every time if you have too many listeners. and its best to keep it to a minimum.
I guess ill just have to test and see, does anyone have any opinions on which is best practice?