6.4 Statements Versus Actions

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 6.  Statements

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.

     



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net