Multiple MCs, Single Listener, AsBroadcaster
- by Brett
I'm currently working trying to have multiple MCs inside a container MC which when they mini MCs are clicked will broadcast a message so that I can act upon them. This would be simple in AS 3 as it would be mc.addEventListener(MouseEvent.CLICK, obj); however, this is AS 2 and so I am semi-forced to use the broadcastMessage('myMessage'); and mc.addListener(obj); event handler.
The main problem is that the broadcaster isn't broadcasting any messages.
The second problem is that there are 5 MCs and when I click one of them, I get 5 trace messages about the click. I can't seem to keep the MC clicks unique even though they are all given separate instance names vie the properties panel.
Any help would be appreciated.
A link to my code is here (pastie.org #481511). Can you see anything wrong?