
10
Adobe Flash CS3 Classroom in a Book
Lesson 6: Creating Interactive Files
Lesson 6 emphasizes interactivity, especially through
the use of buttons and audio files. Students manipu-
late gradients, nest multiple kinds of symbols within
a single symbol, and prepare a file for ActionScript.
Lesson 7 introduces ActionScript fully, but the Lesson
6 file contains ActionScript that is summarized in a
sidebar.
Creating buttons
The buttons in this lesson are button symbols that
include nested movie clip and graphic symbols. Review
the kinds of symbols and the benefits of each. But-
ton symbols contain rollover states in their Timelines.
Movie clip symbols can have drop shadows applied
and include Timelines that can be animated just as the
main Timeline can be. Graphic symbols let you repeat a
single image multiple times without having to include
the data multiple times. Additionally, you can create a
graphic symbol that contains multiple images, and use
a different image in each instance of the symbol.
Aligning buttons
The Align panel makes it easy to align or evenly space
objects horizontally or vertically. You can align objects
relative to the Stage or relative to each other. Demon-
strate the options in the Align panel, and encourage
students to experiment so that they are familiar with
the different options.
Activating the buttons
The buttons’ rollover states work without ActionScript,
but ActionScript is required if the button clicks are
to have any effect otherwise. Though students do not
create ActionScript in this lesson, they do learn how
to name instances and prepare a file for ActionScript.
Emphasize the importance of naming instances so
ActionScript can refer to them.
When naming instances, use lowercase or camelcase.
It’s often helpful to name an instance with an extension
that identifies its symbol type. Flash designers typically
name instances of movie clip symbols with an _mc
extension, button symbols with a _btn extension, and
graphic symbols with a _gr extension.
Name instances in a way that is meaningful, so you’ll
remember what you’ve called them when you’re writing
ActionScript. Shorter names are easier to type without
error, but longer names may be easier to remember and
to identify when you’re editing the ActionScript later.
The ActionScript behind the scenes
Encourage students to view the ActionScript that is in-
cluded in the lesson file. Select frame 9 on the Actions
layer in the main Timeline, and then choose Window >
Actions to open the Actions panel.
The ActionScript used in the lesson is described in the
sidebar at the end of the lesson. Students will learn
about ActionScript in Lesson 7 and can refer back to
the ActionScript used in Lesson 6.
LESSON 6
Komentáře k této Příručce