MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Specifiche Pagina 332

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 369
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 331
32
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"
}
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(newClient, serverToClient, clientToServer){
newClient.setBandwidthLimit(serverToClient, clientToServer);
application.acceptConnection(newClient);
}
Vedere la pagina 331
1 2 ... 327 328 329 330 331 332 333 334 335 336 337 ... 368 369

Commenti su questo manuale

Nessun commento