downloads - lesson 5

Click SWF to play the example. Right-click (or Control-click/Mac) FLA to download the file and see the Timeline, etc.

Note: If you get a Missing Font Warning when you open the FLA in Flash, it's okay. Click the Use Default button.

> Preliminary Work
This file is equivalent to what you create in Exercise 5.1. It has no buttons yet, and it loops forever. You will add buttons to this simple animation to control it (compare with the next two examples, below).

> Stop and Play Buttons
When you click the Stop button, the plane stops moving. When you click the Play button, the plane starts moving again, from the same place where it stopped. You can stop and start it again and again. Notice that if you click Stop repeatedly, it has no effect; the animation stays stopped. The same result comes from repeated clicking of the Play button. Each button does only one thing, which is exactly what it was scripted to do.

> Buttons That Let You Jump on the Timeline
At first, nothing happens. There is a stop action on Frame 1, so the movie does not play automatically. Whenever you click the Right button, the plane crosses the screen from left to right. Whenever you click the Left button, the plane crosses the screen from right to left. You can stop the plane in either direction. Compare with the previous examples (above). The movie does not loop now. The buttons control all the motion in the movie.

The Timeline for the finished "Buttons That Let You Jump on the Timeline" file appears below. This is a very common construct for various movie clip symbols in Flash movies (see Lesson 6).

Flash Timeline

> Buttons That Let Users Choose the Angle
This simple version of a sports stadium graphic uses invisible buttons to allow users to select a close-up view of four sections of the stadium. All four views exist on the same Timeline. Buttons send the users to the view they select. When the mouse rolls over the scene, text pops up to tell users what they will see if they click; when they click, they go to another position in the Timeline.

> Using Buttons to Navigate One Frame at a Time
A very simple (one word) script on each button controls a simple forward-and-back slideshow.

> BONUS How to Hide and Dim a Button
The three-frame version (no functions) :: SWF :: FLA
The one-frame version (all ActionScript) :: SWF :: FLA

Download all FLA files for this lesson (requires Flash MX or later):
> Windows (.zip) 54 KB
> Mac (.sit) 53 KB