MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Uživatelský manuál Strana 40

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 80
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 39
40
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"
}
Client.setBandwidthLimit
Availability
Flash Communication Server MX.
Usage
Client.setBandwidthLimit(iServerToClient, iClientToServer)
Parameters
iServerToClient The bandwidth from server to client, in bytes per second. Use 0 if you dont
want to change the current setting.
iClientToServer The bandwidth from client to server, in bytes per second. Use 0 if you dont
want to change the current setting.
Returns
Nothing.
Description
Method; sets the maximum bandwidth for this client from client to server, server to client, or
both. The default value for a connection is set for each application in the Application.xml file.
The value specified cannot exceed the bandwidth cap value specified in the Application.xml file.
Example
The following example sets the bandwidth limits for each direction, based on values passed to the
onConnect function:
application.onConnect = function(newClient, serverToClient, clientToServer){
newClient.setBandwidthLimit(serverToClient, clientToServer);
application.acceptConnection(newClient);
}
Zobrazit stránku 39
1 2 ... 35 36 37 38 39 40 41 42 43 44 45 ... 79 80

Komentáře k této Příručce

Žádné komentáře