03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - 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.

Method summary<br />

Modifiers Signature Description<br />

addProperty(name:Str Creates a getter/setter property.<br />

ing,<br />

getter:Function,<br />

setter:Function) :<br />

Boolean<br />

hasOwnProperty(name:<br />

String) : Boolean<br />

isPropertyEnumerable<br />

(name:String) :<br />

Boolean<br />

isPrototypeOf(theCla<br />

ss:Object) : Boolean<br />

static registerClass(name:S<br />

tring,<br />

theClass:Function) :<br />

Boolean<br />

Indicates whether an object has a specified property<br />

defined.<br />

Indicates whether the specified property exists <strong>and</strong> is<br />

enumerable.<br />

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

the prototype chain of the object specified as an<br />

argument.<br />

Associates a movie clip symbol with an <strong>ActionScript</strong><br />

object class.<br />

toString() : String Converts the specified object to a string <strong>and</strong> returns it.<br />

unwatch(name:String) Removes a watchpoint that Object.watch() created.<br />

: Boolean<br />

valueOf() : Object Returns the primitive value of the specified object.<br />

watch(name:String,<br />

callback:Function,<br />

[userData:Object]) :<br />

Boolean<br />

Registers an event h<strong>and</strong>ler to be invoked when a<br />

specified property of an <strong>ActionScript</strong> object changes.<br />

addProperty (Object.addProperty method)<br />

public addProperty(name:String, getter:Function, setter:Function) : Boolean<br />

Creates a getter/setter property. When Flash reads a getter/setter property, it invokes the get<br />

function, <strong>and</strong> the function's return value becomes the value of name. When Flash writes a<br />

getter/setter property, it invokes the set function <strong>and</strong> passes it the new value as a parameter. If<br />

a property with the given name already exists, the new property overwrites it.<br />

A "get" function is a function with no parameters. Its return value can be of any type. Its type<br />

can change between invocations. The return value is treated as the current value of the<br />

property.<br />

Object 1005

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

Saved successfully!

Ooh no, something went wrong!