Chapter 11. Arrays

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Part I:  ActionScript Fundamentals

Back in Chapter 3, we saw that primitive datatypes strings, numbers, Booleans, null, and undefined represent basic information in our scripts. We also saw that ActionScript supports several composite datatypes, which can group several pieces of data together into a single datum.

The array type is the first composite datatype we'll study. Arrays are used to store and manipulate ordered lists of information and are, therefore, fundamental tools in sequential, repetitive programming. We use them to do everything from storing values retrieved via a user-input form, to generating pull-down menus, to keeping track of enemy spacecraft in a game. In its most basic form, an array is just a list of items, like your grocery list or the entries in your checkbook ledger.

     



    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