ahref.com > Guides > Design
Macromedia Flash Tutorial, Part II, Continued
Controlling the Timer
The finished timer has three buttons: Start, Stop, and Reset. Each button is created in a similar fashion. Open your Flash Library and find the Movie Clip called 'Clock'. You should have created this clip in Part I of this tutorial.
You will need three frames in this clip: Park, On and Off. You will also need to put a stop action in the second frame (this frame is named On). This is where you will place
the Start button in the Button layer.
You will place the Stop button in the third frame of the Button
layer.
The Reset button will be placed in the second frame of the Reset layer. You want the Reset button to be available while the timer is stopped or running, so you will need to leave an empty (blank) frame in the third frame of the Reset layer. Empty frames reflect whatever is in the previous Keyframe (represented by a filled blue dot) or Empty Keyframe (represented by a hollow blue dot).
Empty Keyframes have no images, but they can have labels and actions
applied to them.
To create these buttons, use Insert > Create Symbol. Be sure to select
Button as the Behavior. All three symbol types in Flash 3 can share
behaviors, but due to the special nature of buttons, a symbol must be
originally created as a button to function as a button.
For the Start
button, select the pencil tool and rectangle shape and draw a
rectangle outline. Use the fill tool to fill in the rectangle.
If we wanted to have the Up, Over, and Down states identical, we could stop now.
Highlight the Over, Down, and Hit frames, click on the right mouse button, and
select Insert Keyframe from the drop down menu. Go to the Over and Down
frames and change the colors as desired.
Next, go to the Hit area and
delete the border. You need to eliminate line borders in the Hit frame in Flash 3
to prevent a flickering mouse behavior that occurs sometimes at the
interior edge (between the line borders and their fills).
We'll add a new layer for text above the main
button layer. Since we don't want the text to appear in the Down or Hit
frames, we'll put an empty keyframe in the Down frame.
|