I have a list of buttons:
agreeButton disagreeButton container.clickButton1 container.clickButton2
Container is another movieclip and inside of it are the last 2 buttons.
How can I put it in array and have all the same listeners applied to each of them?
var buttonArray:Array = new Array("agreeButton", "disagreeButton", "container.clickButton1", "container.clickButton2");
for (var i:int=0; i<buttonArray.length; i++) {
this[buttonArray[i]].addEventListener(MouseEvent.ROLL_OVER, mouseRollOver);
this[buttonArray[i]].addEventListener(MouseEvent.ROLL_OUT, mouseRollOut);
this[buttonArray[i]].addEventListener(MouseEvent.CLICK, mouseClick);
}