Table of Contents

Object._ _proto_ _ Property Flash 5

a reference to the object's constructor's prototype property read/write
someObject._ _ proto_ _

Description

The _ _proto_ _ property stores a reference to the automatically-assigned prototype property 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 determine 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 Section 12.7.3 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; Section 12.7.1


Table of Contents