nice!
;)
On 1 Jul 2008, at 08:37, Steven Sacks wrote:
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
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders