Why? You already set buttons to _menuButtons. Now you're going to set
it again?
Besides, that ternary is not DRY because you are setting buttons = twice.
However, it can be compacted even more, and in 2 lines, instead of 3, by
reusing clip and a ternary in the var declaration, like so:
var clip:* = e.target;
var buttons:Array = (clip.buttonType == 1) ? _subMenuButtons: _menuButtons;
:)
Allandt Bik-Elliott (Receptacle) wrote:
should that be:?
var clip:* = e.target;
var buttons:Array = _menuButtons;
(e.target.buttonType == 1) ? buttons = _subMenuButtons : buttons =
_menuButtons;
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders