For more information on working with custom and built-in classes, see the following topics:
About object-oriented programming and
Flash
ActionScript 2.0 is an object-oriented language. Like ActionScript, OOP languages are based
on the concept of classes and instances. A class defines all of the properties that distinguish a
series of objects. For example, a User class represents a bunch of users who are using your
application. Then, you have an instantiation of the class, which, for the User class, is one of
the individual users-one of its members. The instantiation produces an instance of the User
class, and that instance has all of the properties of the User class.
Classes are also considered like data types or templates that you can create to define a new type
of object. For example, if you need a data type of Lettuce in your application, you might write
the Lettuce class. This defines the Lettuce object, and then you can assign your Lettuce
methods (
) and properties (
or
). To define a class, you use the
wash()
leafy
bugs
class
keyword in an external script file. You can create an external script file in the Flash authoring
tool by selecting File > New and then selecting ActionScript File.
226
Classes
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?