255
22
CHAPTER 22
ActionScript: Work with
Objects and Classes
Classes are the blueprint for objects in Macromedia Flash Basic 8 and
Macromedia Flash Professional 8. 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. This tutorial will show you how to
create and modify classes.
You can print this tutorial by downloading a PDF version of it from the
Macromedia Flash Documentation page at
www.macromedia.com/go/
fl_documentation
.
In this tutorial, you will complete the following tasks:
Set up your workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Learn about classes and object types . . . . . . . . . . . . . . . . . . . . . . 256
Create an object from a class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257
Create a custom class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Create two objects from the Product class . . . . . . . . . . . . . . . . . 263
Learn about extending existing classes . . . . . . . . . . . . . . . . . . . . 264
Extend the MovieClip class to create a new class . . . . . . . . . . . 265
NOT
E
This tutorial is designed for Flash developers who are familiar with basic
Flash and ActionScript concepts.
Summary of Contents for FLASH 8-FLASH
Page 1: ...Flash Tutorials...
Page 10: ...10 Contents...
Page 12: ...12 Introduction...
Page 42: ...42 Basic Tasks Creating a banner Part 1...
Page 78: ...78 Basic Tasks Creating a banner Part 3...
Page 88: ...88 Basic Tasks Create Accessible Flash Content...
Page 106: ...106 Basic Tasks Create an Application...
Page 116: ...116 Basic Tasks Use Layout Tools...
Page 124: ...124 Basic Tasks Create Symbols and Instances...
Page 134: ...134 Basic Tasks Add Button Animation and Navigation...
Page 144: ...144 Basic Tasks Create a Presentation with Screens Flash Professional Only...
Page 192: ...192 Creating Graphics Applying Gradients...
Page 198: ...198 Creating Graphics Apply Graphic Filters and Blends Flash Professional Only...
Page 224: ...224 ActionScript Use Script Assist mode...
Page 268: ...268 ActionScript Work with Objects and Classes...
Page 270: ...270 Data Integration Overview Flash Professional Only...