Flash Media Server Developer Documentation

Client.agent

clientObject.agent

Read-only; the version and platform of the client.

When a client connects to the server, the format of Client.agent is as follows:

Operating_System Flash_Player_Version

For example, if Flash Player version 9.0.45.0 is running on Windows, the value of Client.agent is:

"WIN 9,0,45,0".

When a connection is made to another Flash Media Interactive Server, the format of Client.agent is as follows:

Server_Name/Server_Version Operating_System/Operating_System_Build

For example, if the server version is 3.0.0 and it's running on Windows Server 2003, the value of Client.agent is:

"FlashCom/3.0.0 WIN/5.1.2600".

Availability

Flash Communication Server 1

Example

The following example checks the agent property against the string "WIN" and executes different code depending on whether they match. This code is written in an onConnect() function:

function onConnect(newClient, name){
    if (newClient.agent.indexOf("WIN") > -1){
        trace ("Window user");
    }    else {
        trace ("non Window user.agent is" + newClient.agent);
    }
}