
Object.registerClass() Class Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
725
See Also
instanceof, Object.__proto__; Chapter 12
Object.__proto__ Property
a reference to the object’s constructor’s prototype property
Flash 5
read/write
someObject.__ proto__
Description
The __proto__ property stores a reference to the automatically-assigned prototype prop-
erty of someObject’s constructor function, which is used to transfer properties down
through a class hierarchy. An object’s
__proto__ property is mostly used internally by the
interpreter to look up inherited properties for an object, but we can also use it to deter-
mine the class of an object, as shown in Example 12-5. Some developers also use
__proto__
to establish inheritance between a subclass and its superclass, as discussed in “Advanced
Issues with Standard SuperClass Assignment” in Chapter 12.
Note that the __proto__ property is formed using two underscore
characters at its beginning and another two underscore characters at
its end.
Usage
Overwriting an object’s __proto__ property is not recommended, because it alters the
natural structure of class inheritance.
See Also
Function.prototype, instanceof; “The __proto__ property,” in Chapter 12
Object.registerClass() Class Method
assign a constructor for a movie clip symbol
Flash 6
Object.registerClass( ...