7
CHAPTER 7
Classes
This chapter introduces you to using and writing classes using ActionScript 2.0. Classes are
the backbone of ActionScript 2.0, and are more important than they were in earlier versions
of Macromedia Flash. You will learn how important classes are in Flash throughout
this chapter.
This chapter begins by explaining some fundamental terminology and how it relates to classes
and object-oriented programming (OOP). Next you walk through a sample class file and
understand how each section of the class file works and how the class is organized. The rest of
the chapter shows you how to create your own custom classes and how to use them within
your Flash documents. You learn about the Flash classpath and how a class should be
documented so that other people who read or use your code can easily understand the code
and the class's overall purpose.
This section contains code examples that you can use to become familiar with creating classes
in ActionScript 2.0. By the end of this chapter, you should be able to write a typical class file,
understand and recognize Flash classes, and also feel comfortable reading other people's
class files.
If you're not familiar with ActionScript 2.0 scripting, see
Chapter 5, "Syntax and Language
Fundamentals," on page 113
and
Chapter 19, "Best Practices and Coding Conventions for
ActionScript 2.0," on page
731.
225
Need help?
Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?