Application.registerclass; Application.registerproxy - MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Manual

Server-side communication actionscript dictionary
Table of Contents

Advertisement

If you register a class that has its prototype set to another class, you must set the prototype
constructor back to the original class after setting the prototype. The second example below
illustrates this point.
Example
This example defines a
application connects, the
type
. When a typed object is sent from the client to the server, this class is called to create
Color
the server-side object. After the application stops, the
passes the value
null
function Color(){
this.red = 255;
this.green = 0;
this.blue = 0;
}
Color.prototype.getRed = function(){
return this.red;
}
Color.prototype.getGreen = function(){
return this.green;
}
Color.prototype.getBlue = function(){
return this.blue;
}
Color.prototype.setRed = function(){
this.red = value;
}
Color.prototype.setGreen = function(){
this.green = value;
}
Color.prototype.setBlue = function(){
this.blue = value;
}
application.onAppStart = function(){
application.registerClass("Color", Color);
};
application.onAppStop = function(){
application.registerClass("Color", null);
};
The following example shows how to use the
property:
prototype
function A(){}
function B(){}
B.prototype = new A();
B.prototype.constructor = B; // set constructor back to that of B
// insert code here
application.registerClass("B", B);

Application.registerProxy

Availability
Flash Communication Server MX.
Usage
application.registerProxy(methodName, proxyConnection [, proxyMethodName])
constructor function with properties and methods. After the
Color
method is called to register a class for the objects of
registerClass
to unregister the class.
registerClass

application.registerClass

Server-Side Communication ActionScript
method is called again and
method with the
21

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY and is the answer not in the manual?

This manual is also suitable for:

Flash communication server mx

Table of Contents