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

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

The TextField package contains the StyleSheet class that you can use to apply CSS styles
to text.
Class
StyleSheet

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
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
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
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.
296
Classes
Description
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).
"About top-level and built-
286.
operator to invoke the class's
new

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

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?

This manual is also suitable for:

Flash 8

Table of Contents