03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Indicates whether the specified property exists <strong>and</strong> is enumerable. If true, then the property<br />

exists <strong>and</strong> can be enumerated in a for..in loop. The property must exist on the target object<br />

because this method does not check the target object's prototype chain.<br />

Properties that you create are enumerable, but built-in properties are generally not<br />

enumerable.<br />

Parameters<br />

name:String -<br />

Returns<br />

Boolean - A Boolean value: true if the property specified by the name parameter is<br />

enumerable.<br />

Example<br />

The following example creates a generic object, adds a property to the object, then checks<br />

whether the object is enumerable. By way of contrast, the example also shows that a built-in<br />

property, the Array.length property, is not enumerable.<br />

var myObj:Object = new Object();<br />

myObj.prop1 = "hello";<br />

trace(myObj.isPropertyEnumerable("prop1")); // Output: true<br />

var myArray = new Array();<br />

trace(myArray.isPropertyEnumerable("length")); // Output: false<br />

See also<br />

for..in statement<br />

isPrototypeOf (Object.isPrototypeOf method)<br />

public isPrototypeOf(theClass:Object) : Boolean<br />

Indicates whether an instance of the Object class is in the prototype chain of the object<br />

specified as an argument. This method returns true if the object is in the prototype chain of<br />

the object specified by the theClass parameter. The method returns false not only if the<br />

target object is absent from the prototype chain of the theClass object, but also if the<br />

theClass argument is not an object.<br />

Parameters<br />

theClass:Object -<br />

Object 525

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!