EasyManua.ls Logo

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH - Page 804

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...
804 Terminology
Caching refers to information that is reused in your application, or information that is stored
on your computer so it can be reused. For example, if you download an image from the
internet, its often cached so you can view it again without downloading the image data.
Callback functions are anonymous functions that you associate with a certain event. A
function calls a callback function after a specific event occurs, such as after something finishes
loading (
onLoad()) or finishes animating (onMotionFinished()). For more information and
an examples, see Writing anonymous and callback functions” on page 208.
Characters are letters, numerals, and punctuation that you combine to make up strings.
They are sometimes called glyphs.
Classes are data types that you can create to define a new type of object. To define a class,
you use the
class keyword in an external script file (not in a script you are writing in the
Actions panel).
Classpath refers to the list of folders in which Flash searches for class or interface definitions.
When you create a class file, you need to save the file to one of the directories specified in the
classpath, or a subdirectory within that. Classpaths exist at the global (application) level, and
at the document level.
Constants are elements that dont change. For example, the constant Key.TAB always has
the same meaning: it indicates the Tab key on a keyboard. Constants are useful for
comparing values.
Constructor functions (or constructors) are functions that you use to define (initialize) the
properties and methods of a class. By definition, constructors are functions within a class
definition that have the same name as the class. For example, the following code defines a
Circle class and implements a constructor function:
// file Circle.as
class Circle {
private var circumference:Number;
// constructor
function Circle(radius:Number){
this.circumference = 2 * Math.PI * radius;
}
}
The term constructor is also used when you create (instantiate) an object based on a particular
class. The following statements are calls to the constructor functions for the built-in Array
class and the custom Circle class:
var my_array:Array = new Array();
var my_circle:Circle = new Circle(9);

Table of Contents

Related product manuals