Server-Side Communication ActionScript > Client.__resolve

 

Client.__resolve

Availability

Flash Communication Server MX.

Usage

Client.__resolve = function(propName){
	// insert code here
};

Parameters

propName The name of an undefined property.

Returns

The value of the undefined property, which is specified by the propName parameter.

Description

Method; provides values for undefined properties. When an undefined property of a Client object is referenced by server-side ActionScript code, that object is checked for a __resolve method. If the object has a __resolve method, the __resolve method is invoked and passed the name of the undefined property. The return value of the __resolve method is the value of the undefined property. In this way, __resolve can supply the values for undefined properties and make it appear as if they are defined.

Example

The following example defines a function that is called whenever an undefined property is referenced:

Client.prototype.__resolve = function (name) {
	return "Hello, world!";
};
function onConnect(newClient){
	trace (newClient.property1); // this will print "Hello World"
}