Object._ _proto_ _ Property

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
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



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net