|
||||||
|
||||||
Flash Tutorial - Creating simple buttons
Free
Flash Tutorial
This tutorial is designed for people who have little Experience of using Flash. The aim of the tutorial is to be able to create your own buttons, how to Align objects to the stage and create layers.
States of the button
The button can change it's appearance according to what 'state' it is in. There are four states: Up, Over, Down and Hit.
1. Up: Is when the mouse pointer is not over
the button.
2. Over: Is when the mouse pointer is over the button.
3. Down: Is when the mouse pointer is over the button and the
mouse button is down.
4. Hit: Is an invisible area of the screen. This area defines
when the mouse pointer is 'over' the button or not.
Roll your mouse over the button below and click to see the Up, Over and Down states. You can't see the Hit area as it is invisible. The button has no actions so does not do anything.
My Example: Download the Flash File Beg
005a
Roll your mouse over and click to see the different button states.
New: See
Flash Demo Movie of how to build this Flash file
Step one: Setting up the Document
Note: You can either have a Flash movie which contains a number of buttons or you can have a Flash movie that is a single button and no more.
My Example: Download the Flash File Beg 005b
A Flash movie with several buttons. File size: 400 x130px
My Example: Download the Flash File Beg 005c
A Flash movie which is a single button. File size: 105 x31px
Step two: Creating the button symbol
A button is a type of Symbol, so the first to do is create a 'Button Symbol'.

New Symbol Dialog Box.
You will go to a new stage, called Button 1. In this stage, you will have four frames:

Frame 1 - Up
Frame 2 - Over
Frame 3 - Down
Frame 4 - Hit
Step three: Creating the up state

should still be selected (it will be white, not gray, see picture below).
Step four: The over state
Step five: The down state
Do the same as step three by:

Step six: Placing the button on the main stage:
Step seven: Actions
You now have a new button which you will need to add actions to so that it does something. See previous tutorial for details of how to do this: Creating Links within a Flash Movie
The hit state
The hit area is normally the same as the rectangle. You do not need to create this unless the hit area is different to the original rectangle you created on frame one.
Note: If your button does not have a solid background
(in this case a rectangle) but only text, you will have to create a rectangle
(or other solid shape), in the hit area frame. Otherwise when the mouse pointer
goes over the gaps between the letters, the button will go back to frame one:
The over state.
Very slowly move the mouse over button 1 below and you will see the problem.
My Example: Download the Flash File: Beg
005d
Move the mouse slowly over the Buttons to see the difference.
Button 1 is not stable and moves between states with small movements of the mouse.
Button 2 is stable. Button 2 has a rectangle in the 'Hit' frame. This is not visible in the movie, but controls the 'Up', 'Over' and 'Down' states.
If you are having difficulty understanding this, download the movie and look inside the symbol at the Hit Frame. To look inside the symbol double click it on stage.
Have fun with your buttons, make them wild and wonderful!
Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates
•
85453 visitors to this page since Jan 04 |
|
|
All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.
|