Tutorials Flash & Swish Swish Tutorials Button Disable/Enable

Button Disable/Enable


Click on the buttons above to disable and enable buttons when clicked.

Lets start by opening SwishMax, set you movie size for your buttons.

Step. 1

Select the Rectangle tool and create a button shape like in the example above

Also select the colour of the rectangle.

Now select the Text tool and type what you wish your button to say, example "HOME".

Once you have the rectangle and the text placed over the top of the rectangle,

Select both items and group together as a sprite, then group the sprite as a button.

Now select the button and give it a separate over and down state.

Change the rectangle and text colour in the over and down state the same colour but different from the up state.

Step. 2

Add the following code to the button.

on (release) {
home.enabled = false;

To enable the button again add the following code to another button.

on (release) {
home.enabled = true;

To create more buttons just follow steps 1 and 2 again, or download the example file below.

subscribe to newsletter