PLEASE note: These pages are here solely for historic purposes. New articles have not been written since 2001; many links in the index are broken; and most ahref.com email addresses will now bounce. Try visiting ep Productions, Incorporated, the web programming and development company behind this site.

Tip: Want to know when we post new content? Subscribe to our newsletter.

web index ahref.com: a community space for web developers------ -----
IndexToolsCareersTalk
ahref.com > Guides > Design

Design Guide

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.

continue reading >>>
or jump to a topic:

Introduction
Using Buttons to Get User Input
Controlling the Timer
Adding Actions to Buttons
Keeping Accurate Time
Finishing Up
Flash Resources


view a printable version of this article


To suggest a topic, please email guides@ahref.com.

 


HOME ||| ABOUT AHREF.COM ||| ADVERTISE ||| FEEDBACK ||| SEARCH THIS SITE ||| CONTRIBUTE

© 1998-1999 ep Productions, Inc. All rights reserved. Terms of use.