I'm kinda rusty with all things AS3 as I've been working with C# the past year but I was browsing through my code from my first game I ever made (this was before knew how to use classes) and I noticed all of these mouse click listeners
gameCon.heroAttack.addEventListener(MouseEvent.CLICK, onHeroAttackClick);
gameCon.villianAttack.addEventListener(MouseEvent.CLICK, onVillianAttackClick);
gameCon.heroMagic.addEventListener(MouseEvent.CLICK, onHeroMagicClick);
gameCon.villianMagic.addEventListener(MouseEvent.CLICK, onVillianMagicClick);
gameCon.heroHeal.addEventListener(MouseEvent.CLICK, onHeroHealClick);
gameCon.villianHeal.addEventListener(MouseEvent.CLICK, onVillianHealClick);
gameCon.playAgain.addEventListener(MouseEvent.CLICK, onPlayAgainClick);
gameCon.showBtnMap.addEventListener(MouseEvent.CLICK, onShowBtnMap);
gameCon.menuBtn.addEventListener(MouseEvent.CLICK, onMenuBtn);
muteBtn.addEventListener(MouseEvent.CLICK, onMuteBtn);
It got me wondering.... is there a way in AS3 to just listen for a single mouse click in the entire game, check for object(s) where mouse was clicked, and then execute code according to what was clicked? Even if what was clicked on was nested in another MC?