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 Flash 5 ActionScript Reference Guide uses the terms “Action” and “statement” interchangeably.

Using the term “Action” as a synonym for “statement” blurs the distinction between several different ActionScript tools. To see how, open the ActionScript editor and look in the Actions folder, as shown in Figure 1.2. Under the list of Actions in that folder, you’ll find the statements we saw earlier in Table 6.1. Interspersed with the statements you’ll also notice quite a few functions: gotoAndPlay( ), getURL( ), startDrag( ), and so on. Although the functions listed as Actions can be used in statements, they’re technically not unique statement types—they’re just built-in functions. Statements, some built-in functions, and event handlers are all called Actions by Macromedia. Throughout this book, we do not use the generic term Action. Instead, each Action is described with the term that matches its formal role in the language: either statement, function, or event handler.

Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.