July 2003
Intermediate to advanced
896 pages
45h 43m
English
The server-side portion of the video chat/message center application is contained within a single ASC file, main.asc. Here are the steps necessary to create the server-side part of this application:
Create a new
FlashCom application named
CommunicationCenterApp
.
You can do this by making a new directory with this name inside of
the FlashCom server’s
applications directory.
Create a new file inside of the
CommunicationCenterApp directory. Name the file
main.asc.
Add the following code to main.asc:
// Theapplication.onConnect( )method is invoked each time a new client connects // to the application. ThenewClientparameter is a FlashCom-generated reference // to the new client. Theusernameparameter is a value passed to the method by // the Flash client. application.onConnect = function (newClient, username, password) { newClient.username = username; newClient.password = password; // TheacceptClient( )function accepts the client and assigns methods to the // client object according to the user type. acceptClient(newClient); }; // Theapplication.onDisconnect( )method is automatically invoked whenever a // client disconnects from the application. application.onDisconnect = function (disconnectClient) { // If the client who has disconnected was on a call with the administrator, // release that connection by setting thecallingClientproperty tonull. Also, // if the administrator is still online, invoke theincomingCallEnd( )method // in the ...
Read now
Unlock full access