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: Can't find what you need on ahref.com? Tell us what you want to see covered.

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

Design Guide

Macromedia Flash Tutorial, Part II, Continued


Using Buttons to Get User Input

In Flash, buttons are the only direct way that you can get input from a user. A button is a special type of symbol with four frames in its timeline:

  • The first frame ( the Up state) represents the default state of a button--the button "at rest."
  • The second frame (the Over state) determines the appearance of a button when a mouse is rolled over it. In Flash, you need to specify the part of the image that is "hot" (the area of the image that will change on mouseover). This area is called the hit area.
  • The third frame (the Down state) displays the appearance of the button when the mouse is depressed (when a user clicks on it).
  • The fourth frame (the Hit state) defines the area or areas that will respond to the mouse on mouseover. Any graphics placed in the button's fourth frame are used to map the hit area only. They will never be visible in the animation.
You construct the first three frames as if you were creating a JavaScript mouseover. You will need to create three versions of an image to reflect the actions that will occur (at rest, mouseover, on mouse click). The fourth frame, the Hit state, works a little differently.

Start by removing any text and other decorative elements you might have copied into the Hit frame. All you'll need is a simple filled rectangle, oval, or other shape to define the area that you want to react to the mouse. Make sure you use a solid color to fill your shape (not a gradient), and remove any line borders around your shape. Though most buttons will have the Up, Over, Down and Hit areas in the same place on the image, this is not required.

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.