Server-Side Communication ActionScript > Client.agent

 

Client.agent

Availability

Flash Communication Server MX.

Usage

Client.agent

Description

Property (read-only); contains the version and platform information of the Flash client.

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 inside 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);
	}
}