O'Reilly logo

Understanding Flash MX 2004 ActionScript 2 by Alex Michael

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4

Variables, “If”, “For” and “While” Loops

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required