556
ActionScript classes
Properties that you create are enumerable, but built-in properties are generally not
enumerable.
Availability:
ActionScript 1.0; Flash Lite 2.0
Parameters
name
:
String
-
Returns
Boolean
- A Boolean value:
true
if the property specified by the
name
parameter is
enumerable.
Example
The following example creates a generic object, adds a property to the object, then checks
whether the object is enumerable. By way of contrast, the example also shows that a built-in
property, the
Array.length
property, is not enumerable.
var myObj:Object = new Object();
myObj.prop1 = "hello";
trace(myObj.isPropertyEnumerable("prop1")); // Output: true
var myArray = new Array();
trace(myArray.isPropertyEnumerable("length")); // Output: false
See also
for..in statement
isPrototypeOf (Object.isPrototypeOf method)
public isPrototypeOf(theClass:
Object
) : Boolean
Indicates whether an instance of the Object class is in the prototype chain of the object
specified as an argument. This method returns
true
if the object is in the prototype chain of
the object specified by the
theClass
parameter. The method returns
false
not only if the
target object is absent from the prototype chain of the
theClass
object, but also if the
theClass
argument is not an object.
Availability:
ActionScript 1.0; Flash Lite 2.0
Parameters
theClass
:
Object
-
Summary of Contents for Flash Lite 2
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...