User Guide
Object 1001
Returns
Boolean - A Boolean value: if the class registration succeeds, a value of true is returned;
false otherwise.
See also
attachMovie (MovieClip.attachMovie method), duplicateMovieClip
(MovieClip.duplicateMovieClip method)
__resolve (Object.__resolve property)
public __resolve : Object
A reference to a user-defined function that is invoked if ActionScript code refers to an
undefined property or method. If ActionScript code refers to an undefined property or
method of an object, Flash Player determines whether the object's
__resolve property is
defined. If
__resolve is defined, the function to which it refers is executed and passed the
name of the undefined property or method. This lets you programmatically supply values for
undefined properties and statements for undefined methods and make it seem as if the
properties or methods are actually defined. This property is useful for enabling highly
transparent client/server communication, and is the recommended way of invoking server-
side methods.
Availability: ActionScript 1.0; Flash Player 6
Example
The following examples progressively build upon the first example and illustrate five different
usages of the
__resolve property. To aid understanding, key statements that differ from the
previous usage are in bold typeface.
Usage 1: the following example uses
__resolve to build an object where every undefined
property returns the value
"Hello, world!".
// instantiate a new object
var myObject:Object = new Object();
// define the __resolve function
myObject.__resolve = function (name) {
return "Hello, world!";
};
trace (myObject.property1); // output: Hello, world!
trace (myObject.property2); // output: Hello, world!