EasyManua.ls Logo

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH - About Working with Built-In Classes

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
830 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
296 Classes
The TextField package contains the StyleSheet class that you can use to apply CSS styles
to text.
About working with built-in classes
In object-oriented programming (OOP), a class defines a category of object. A class describes
the properties (data) and behavior (methods) for an object, much like an architectural
blueprint describes the characteristics of a building. For information on classes and other
object-oriented programming concepts, see the following sections:
“Object-oriented programming fundamentals on page 231
“Writing custom class files” on page 235
Flash 8 has many built-in classes that you can use in your code (see About top-level and built-
in classes” on page 286), which helps you easily add interactivity to your applications. To use
the properties and methods defined by a built-in class, you generally first create an instance of
that class (except for classes that have static members). The relationship between an instance
and its class is similar to the relationship between a house and its architectural blueprints, as
discussed in About top-level and built-in classes” on page 286.
For more information on using classes that are built into Flash 8, see the following topics:
About creating a new instance of a built-in class” on page 296
Accessing built-in object properties” on page 297
About calling built-in object methods” on page 298
About class (static) members” on page 298
“Preloading class files” on page 299
“Excluding classes” on page 298
About creating a new instance of a built-in class
To create an instance of an ActionScript class, use the new operator to invoke the classs
constructor function. The constructor function always has the same name as the class, and
returns an instance of the class, which you typically assign to a variable.
Class Description
StyleSheet The StyleSheet class lets you create a style sheet object that contains
text formatting rules such as font size, color, and other formatting
styles. See StyleSheet (TextField.StyleSheet).

Table of Contents

Related product manuals