Name

Object.__proto__ Property — a reference to the object’s constructor’s prototype property

Availability

Flash 5

Synopsis

someObject.__ proto__

Access

Read/write (Overwriting an object’s __ proto__ property is not recommended as it alters the natural structure of class inheritance.)

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.6 and Example 12.9. Note that __ proto__ begins and ends with two underscore characters.

Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.