Working with Movie Clips and Buttons
This section examines two familiar symbols in Flash: movie clips and
buttons. As you will see when working with ActionScript 3.0, you also have
an option to work with
MovieClip objects are a
subclass. Likewise, you will need to know something about a new class
SimpleButton to work effectively
with buttons. Both movie clips and buttons inherit a number of their
classes from the
and in looking at the properties of both classes, the inherited classes
are listed as well.
To get started, you have to re-orient your thinking about how
movie clips created on the stage are connected to ActionScript.
Essentially, when you convert a drawing into a
Button, you are creating a class. The class
name is whatever you give for the
When you create a movie clip using the drawing tools (instead of
creating it using ActionScript 3.0), the Symbol dialog box provides an
"Export for ActionScript" checkbox. When you enable that option, the
Symbol Name appears in the Class
window, and the Base class shows the path to the class base. For
8 shows what you would see if you name the symbol,
Truck, and enable the "Export for ActionScript"
Figure 7. Symbol names become class names for Movie clips and buttons
To work with movie clips created on the stage with drawing ...