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
Your Ad Here

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
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

Internet & computing Flash is a vector-based moving graphics format created by Macromedia for the publication of animations on the World Wide Web. More Flash & Swish: Most Popular Materials | Fresh Materials | More Swish Tutorials at FlashPerfection.com

Add comments to "Button Disable/Enable"

Only registered users can write comment

No comments yet...