Name
Object.constructor Property — a reference to the class constructor function used to create the object
Availability
Flash 5
Synopsis
someObject.constructor
Access
Read/write (overwriting an object’s
constructor
property is not recommended as it
alters the natural structure of class inheritance).
Description
The constructor
property stores a reference to the
constructor function that was used to create
someObject
. For example, the
constructor
property of a
Date
object is the Date
constructor function:
now = new Date( ); now.constructor == Date; // Yields true
See Also
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.