Skip to content
fahimc edited this page Sep 16, 2011 · 1 revision

To create a button you do the following.

var button = new Button();
button.upSkin = "buttonUp";
button.downSkin = "buttonDown";
button.overSkin = "buttonOver";
button.selectedSkin = "buttonSelected";
button.disabledSkin = "buttonDisable";
button.setWidth(100);
button.setHeight(30);
button.build();
button.setStyle();
button.arrange();
button.activate();
addChild(button);

To disbale the button you call 'diable' function

button.disable();

To Deactivate the button you call 'deactivate' function button.deactivate();

Clone this wiki locally