113
CHAPTER 15
Work with Objects and Classes Using
ActionScript 2.0
Classes are the blueprint for objects in Macromedia Flash MX 2004 and Macromedia Flash MX
Professional 2004. All objects in Flash have an underlying class; for example, all movie clips have
a method called
getURL
, and
getURL
is defined in the class definition for a movie clip. Flash
contains many predefined classes, such as the MovieClip class, the Array class, the Color class,
and the CheckBox class.
In this lesson, you’ll learn about creating and modifying classes. Specifically, you’ll learn how to
accomplish the following tasks:
•
Create objects from existing classes
•
Create a custom class
•
Use datatyping with custom classes
•
Extend an existing class
Note:
This lesson is designed for Flash developers who are familiar with basic Flash and
ActionScript concepts.
Set up your workspace
First, you’ll view the finished files and set up your workspace to use an optimal layout for
taking lessons.
1.
View the finished files. This lesson does not include start files. You can find finished files of
handson1.fla, handson2.fla, handson3.fla, Product.as, and Drag.as, which are examples of the
files that you’ll create in this lesson:
■
On Windows 2000 or XP, browse to
boot drive
\Documents and Settings\All
Users\Application Data\Macromedia\Flash MX 2004\
language
\Configuration\HelpPanel\
HowDoI\BasicActionScript\finished_files.
Note:
If the Application Data folder is hidden, you’ll need to change your Windows Explorer
settings to see the folder.
■
On Windows 98, browse to
boot drive
\Windows\Application Data\Macromedia\Flash MX
2004\
language
\Configuration\HelpPanel\HowDoI\BasicActionScript\finished_files.
Содержание FLASH MX 2004-LEARNING FLASH
Страница 1: ...Learning Flash...
Страница 8: ...8 Contents...
Страница 34: ...34 Chapter 3 Write Scripts with ActionScript...
Страница 54: ...54 Chapter 6 Create a User Interface with Layout Tools...
Страница 62: ...62 Chapter 7 Draw in Flash...
Страница 68: ...68 Chapter 8 Create Symbols and Instances...
Страница 76: ...76 Chapter 9 Add Animation and Navigation to Buttons...
Страница 104: ...104 Chapter 13 Add Interactivity with ActionScript...
Страница 112: ...112 Chapter 14 Create a Form with Conditional Logic and Send Data...
Страница 122: ...122 Chapter 15 Work with Objects and Classes Using ActionScript 2 0...