ABSTRACT
Variables In order to retrieve and manage information we need to store data as variables; this is the primary
information storage container of ActionScript. A variable is a container that stores a piece of data.
The container itself is always the same, but the contents can change. Variables can be used to store
information as the movie plays and can be used for many situations, such as to change the behavior
of the movie based on the user interaction. I always liken a variable to a bank account, but instead
of holding money it holds data. When you create a new variable it is like setting up a new
account, so your new data is stored in another location different from the previous data. All you
have to do is give the variable a different name so you can remember what data resides with what
variable. Data in the variable account can change; you can add to it or take away from it. Using the
variable (data account) to store information becomes a fixed reference to access changing content.
Variables can hold any type of data: number, string, Boolean, object or movie clip. Typical types
of information you can store in a variable include a URL, a user’s name, the result of a math-
ematical operation, the number of times an event occurred, or whether a button has been clicked.
Each movie and movie clip instance has its own set of variables, with each variable having its own
value independent of variables in other movies or movie clips.