Object
557
Returns
Boolean
- A Boolean value:
true
if the object is in the prototype chain of the object specified
by the
theClass
parameter;
false
otherwise.
Object constructor
public Object()
Creates an Object object and stores a reference to the object's constructor method in the
object's
constructor
property.
Availability:
ActionScript 1.0; Flash Lite 2.0
Example
The following example creates a generic object named myObject:
var myObject:Object = new Object();
__proto__ (Object.__proto__ property)
public __proto__ :
Object
Refers to the
prototype
property of the class (ActionScript 2.0) or constructor function
(ActionScript 1.0) used to create the object. The
__proto__
property is automatically
assigned to all objects when they are created. The ActionScript interpreter uses the
__proto__
property to access the
prototype
property of the object's class or constructor function to find
out what properties and methods the object inherits from its superclass.
Availability:
ActionScript 1.0; Flash Lite 2.0
Example
The following example creates a class named Shape and a subclass of Shape named Circle.
// Shape class defined in external file named Shape.as
class Shape {
function Shape() {}
}
// Circle class defined in external file named Circle.as
class Circle extends Shape{
function Circle() {}
}
The Circle class can be used to create two instances of Circle:
var oneCircle:Circle = new Circle();
var twoCircle:Circle = new Circle();
Summary of Contents for FLASHLITE2 ACTIONSCRIPT-LANGUAGE
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...