_agreeButton = new Button();
_agreeButton.defaultSkin = _whiteQuad;
_agreeButton.downSkin = _redQuad;
_agreeButton.name = "_agreeButton";
_agreeButton.addEventListener( starling.events.Event.TRIGGERED, onTriggered );
_agreeButton.label = "I agree";
_agreeButton.fontStyles = new TextFormat(Main.FONT_BOLD, 25, 0xFF0000);
_agreeButton.setFontStylesForState(ButtonState.DOWN, new TextFormat(Main.FONT_BOLD, 25, 0xFFFFFF));
By the way, it's not necessary, but if you wanted the code to have a similar style throughout, you could change the downSkin
to setSkinForState()
:
_agreeButton.setSkinForState(ButtonState.DOWN, _redQuad);