Touring the Actions Panel
Chapter 15
Touring the Actions Panel
e Actions panel has three work areas: the
Script pane, the Actions Toolbox, and the
Script Navigator. To access the panel, choose
Window > Actions or press Option-F9 (Mac)
or F9 (Windows).
The Mystery of ActionScripting
A script is a series of commands, or statements, that makes Flash perform tasks at runtime—
that is, when a published Flash (SWF)  le runs in Flash Player for your end users to view (see
Chapter 18).
Creating ActionScript basically means writing text. In Flashs default work ow you write
scripts in the Script pane of the Actions panel, and Flash stores them as part of the FLA  le.
You can also save scripts as separate ActionScript  les ( les with the extension .as), and
instruct Flash to include them only when publishing. When you save scripts externally, you
have the option to edit them in any external text editor.
e Actions panel’s Script Assist mode helps you enter code in the Script pane. For begin-
ners, the word assist sounds attractive, but the feature requires some knowledge of scripting.
Script Assist lets you create code by choosing check boxes or menu items and entering text
in special  elds. Script Assist ensures that your ActionScript code has the correct syntax (see
the sidebar “ e Mystery of ActionScript Syntax,” later in this chapter). To use Script Assist,
however, you must already know the kind of statements you need to create an interaction.
Previous versions of Flash tried to provide scripting assistance with Behaviors, which create
the underlying code for a task you want to accomplish, such as linking to a Web site.  e code
created by Behaviors is incompatible with ActionScript 3.0. Hence the Behaviors panel is
disabled when you choose ActionScript 3.0 as the scripting language for your document.
e best way to create interactivity in Flash is to write the necessary scripts on your own.
As scary as this proposition may seem to those who have never scripted before, it is actually
less work than learning how to use the tools that Flash provides to help you write code.  e
exercises in this book create scripts that carry out simple tasks in Flash, such as setting up
buttons that start and stop playback of a movie.  ese techniques are inappropriate for devel-
oping an online store or a complex e-learning course. But they may be all you need to let your
end users start, stop, and replay an animated cartoon; select a favorite scene to view; or link to a
Web page. And with any luck, theyll whet your appetite for learning more about ActionScript.
e Script pane is a text window where you
assemble scripts. You can enter actions into
the pane manually (it acts like a text editor);
and you can also add actions from the