
Introducing
ActionScript
216
Variables
A variable is a place for your script to store a piece
of information. In Flash, you use the
var keyword to
declare a variable. It is also a best practice to add
the variable
type to your declaration. To declare any
variable, you should use the syntax:
var <variable_name>:<variable_type> =
value;
For example, to have Flash remember you have 100
tomatoes, you could write the statement:
var numberOfTomatoes:Number = 100;
Frame Actions
In Flash, you can create actions that are triggered
when the play head reaches a particular keyframe
of your movie. Most of the time, frame actions are
used to tell movie clips to stop or ...