
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
154
|
Chapter 6: Statements
The empty statement has very little practical application, except that it can be used as
a placeholder anywhere a statement is normally expected. It is not needed if you sim-
ply want to add blank lines to your code. ActionScript ignores blank vertical lines,
which can be used to improve code readability.
In Flash’s Normal Mode, the lone semicolon appears when the evaluate Action is
added to a block of code. An arbitrary statement can then be added by typing into
the Expression field of the Parameters panel.
Statements Versus Actions
If you look through the Flash ActionScript editing environment, you won’t find any
reference to the word “statement.” Even Macromedia’s documentation uses the
terms “Action” and “statement” interchangeably, claiming, “Actions are statements
that instruct a movie to do something while it is playing.” Using the term “Action” as
a synonym for “statement” blurs the distinction between several different Action-
Script tools. To see how, open the Actions panel (F9) and look in the Actions folder.
Under the list of Actions in that folder (and its subfolders), you’ll find the state-
ments we saw earlier in Table 6-1. Interspersed with the statements, you’ll also
notice quite a few functions: gotoAndPlay(), getURL(), startDrag(), and so