Our Swish tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website.  Home Flash & Swish Swish Tutorials Button Disable/Enable

Button Disable/Enable


Example:

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.



Author's URL: Craig Lowe
Final results of our readers
New!
Passed through all the steps? Share your result!
Your result will be premoderated.
Please make sure you choose the right image.
 
 



Captcha

*Required fileds
Our Swish tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website. More Swish Tutorials: Featured Materials | Fresh Materials | More Swish Tutorials at FlashPerfection.com

No comments yet...
Add comments to "Button Disable/Enable"

Captcha