Table of Contents

6.4 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 ActionScript 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 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, technically they're 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. Understanding ActionScript from this traditional perspective makes it easier to migrate your skills to other languages and to understand general programming discussions that do not relate specifically to ActionScript.


Table of Contents