MACROMEDIA FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER 2 Manuale Utente Pagina 38

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 172
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 37
35
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
// First step: write the functions.
function Client_getWritePermission(){
// The writeAccess property is already built in to the Client class.
return this.writeAccess;
}
function Client_createUniqueID(){
var ipStr = this.ip;
// The ip property is already built in to the Client class.
var uniqueID = "re123mn"
// You would need to write code in the above line
// that creates a unique ID for each client instance.
return uniqueID;
}
// Second step: assign prototype methods to the functions.
Client.prototype.getWritePermission = Client_getWritePermission;
Client.prototype.createUniqueID = Client_createUniqueID;
// A good naming convention is to start all class method
// names with the name of the class followed by an underscore.
You can also add properties to prototype, as shown in the following example:
Client.prototype.company = "Adobe";
The methods are available to any instance, so within application.onConnect(), which is passed a clientObj
parameter, you can write the following code:
application.onConnect = function(clientObj){
var clientID = clientObj.createUniqueID();
var clientWritePerm = clientObj.getWritePermission();
};
Availability
Flash Communication Server 1
Property summary
Property Description
Client.agent Read-only; the version and platform of the client.
Client.audioSampleAccess Enables Flash Player to access raw, uncompressed audio data from streams in the specified folders.
Client.farAddress Read-only; the derived address from which the server sees the client connection originate.
Client.farID Read-only; a String identifying the RTMFP identity of the server.
Client.farNonce Read-only; a String unique to this client.
Client.id Read-only; a String that uniquely identifies the client.
Client.ip Read-only; a string containing the IP address of the client.
Client.nearAddress Read-only; the public address of the server that the client connected to.
Client.nearID Read-only; a String indicating the RTMFP identity of the server.
Vedere la pagina 37
1 2 ... 33 34 35 36 37 38 39 40 41 42 43 ... 171 172

Commenti su questo manuale

Nessun commento