Flashadvisor logo
:: Desktop Shortcut
:: Flash Help
Advices from Experts

 Submit Here! · Link to Us · Newsletter · Tell a Friend ·

      Add Tutorial |

 

Advertise here










 

Google

Search WWW   
FlashAdvisor.com

 Home > Tutorials  > Beginners

Create Button Define Four Button States

Author: Arun | Email


Advertisement

Buttons has four states: up, over, down, and hit.


codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="150" HEIGHT="150" id="button" ALIGN="">
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">


The Four Button States
Up
The appearance of the button when the pointer is not over it.

Over
The appearance of the button when you place the pointer over it.

Down
The appearance of the button when you click on it.

Hit
Defines the area that will respond to a click of the mouse.





Create a New Layer

Click on the top layer to make the top layer the active layer.
Choose Insert > Layer from the menu to create a new layer.
Choose Modify > Layer from the menu.
Type Button in the Name field to name the layer button.
Click on OK.

Take the Start Button from the Library or Draw a new Button

Move to the Library. If the Library panel is not open, choose Window > Library from the menu.
Click on the icon next to Start Button and drag the Start Button onto the Stage.
Edit the Symbol

Choose Edit > Edit Symbols from the menu to change to the Edit Symbols mode.
The Over Frame

Click in the Over Frame to select it.
Choose Insert > Keyframe from the menu.
Click on the Fill color box and select green.

The Down Frame

Click in the Down Frame to select it.
Choose Insert > Keyframe from the menu.
Click on the Fill color box and select brown.

The Hit Frame

Click in the Hit Frame to select it.
Choose Insert > Keyframe from the menu.
Choose Edit > Edit Movie from the menu.
Right-click on the button.





Choose Actions from the menu
Click on the Plus icon. A context menu will appear.
Choose Basic Actions > Go To from the menu.
Make sure Go To and Play is selected.
Make sure to Add Stop Action on First Frame, i use GoTo frame 5 and stop here on button Click, you can also add the GetUrl to open a new url here.

Test the Movie

Choose Control > Test Movie from the menu. The Test Movie window will open.
Click on the Start Button to make the car roll.
Close the window.
The Text Tool

You need to put a label on the Start Button and add a title to the movie. You will use the Text tool for this.

Add Text to the Button
Click on the Text tool to select it.


Choose Text > Font from the menu and select a font.
Choose Text > Size > 12 from the menu to set the font size to 12.
Click on the Fill color box and select white as the color.
Type Start Movie on the button.
Click anywhere outside the Stage to close the text box.
Use the Arrow tool to adjust the placement of the text.
Click anywhere outside the Stage to deselect the text box.

Add a Title

Choose Text > Size > 24 from the menu.
Select the Text tool.
Click on the lower left corner of the Stage.
Click anywhere outside the Stage.
Test the Movie


Choose Control > Test Movie from the menu. The Test Movie window will open.
Click on the Start Movie button. The movie should play.

Download Source File

| 1 |

Rate This Tutorial :
We hope the information helped you. If you have any questions or comments, please don't hesitate to post them on the Forums section
Submit your Tutorial at Click Here
  

Home | About Us | Contact Us | Feedback | Advertise with us

Best viewed in 800x600 resolution with Internet Explorer.

Site Developed and Hosted by  ethicsolutions.com
All rights reserved with FlashAdvisor

Flash is a registered trademark of Adobe Systems, Inc.

1 user online