EasyManua.ls Logo

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE - Object Constructor; Proto__ (Object.__Proto__ Property)

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE
780 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...
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();

Table of Contents

Related product manuals