Object.constructor
Availability
Flash Player 5
Usage
myObject.constructor
Description
Property; reference to the constructor function for a given object instance. The
property is automatically assigned to all objects when they are created using the constructor for
the Object class.
Example
The following example is a reference to the constructor function for the
var my_str:String = new String("sven");
trace(my_str.constructor == String); //output: true
If you use the
instanceof
class:
var my_str:String = new String("sven");
trace(my_str instanceof String); //output: true
However, in the following example the
types (such as the string literal seen here) into wrapper objects. The
not perform any conversion, as seen in the following example:
var my_str:String = "sven";
trace(my_str.constructor == String); //output: true
trace(my_str instanceof String); //output: false
See Also
instanceof
Object.__proto__
Availability
Flash Player 5.
Usage
myObject.__proto__
Description
Property; refers to the
The
__proto__
ActionScript interpreter uses the
the object's constructor function to find out what properties and methods the object inherits
from its class. Flex developers should not have to use this property.
380
Chapter 6: ActionScript Core Classes
operator, you can also determine if an object belongs to a specified
property of the constructor function that created
prototype
property is automatically assigned to all objects when they are created. The
__proto__
Object.constructor
property to access the
constructor
object.
myObject
property converts primitive data
operator does
instanceof
myObject
property of
prototype
.
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?