for (var i:int = 0; i < buttons.lenght; i++) buttons[i].addEventListener(MouseEvent.CLICK, onClickHandler);