Client Object


The Client object is instantiated by the application.onConnect() method. Each Communication client has a unique object of methods and properties that can be accessed by the server or the client. The Class can be extended with additional properties and methods . Each property is related specifically to the connected client. Client instances are limited only by the license of the server.

Client Methods

The client methods are as follows :

Client.call(methodName, [resultObj, [p1, , pN]])

From SSAS, you can call methods on the client that were created by client ActionScript within in the NetConnection object.

methodName The name of the method defined by the client.
resultObj The object that will handle properties returned to SSAS by the client. The result object should have two methods ( onStatus and onResult ).
p1, ..., pN Optional parameters required by the custom method.
Client.getBandwidthLimit(iDirection)

Returns the maximum one-way communication bandwidth value in bytes between client and server.

iDirection A value of 1 returns the bandwidth from server to client. A value of 0 returns the bandwidth value from client to server.
Client.__resolve(propName)

This method is called when a client calls a method that does not exist. You must overwrite it to handle the error.

propName The name of the method called.
Client.setBandwidthLimit(iServerToClient, iClientToServer)

Defines the maximum bandwidth resources for both directions that a Client can consume . Set a value of 0 in either parameter to not change the current bandwidth setting.

iserverToClient Maximum bandwidth value from server to client.
iClientToServer Maximum bandwidth value from client to server.

Client Properties

Client.agent returns the Flash version and platform of the client.

Client.IP returns the IP address of the client computer.

Client.readaccess sets the "read" and listen security access level (or folder) for SharedObjects and streams. Clients with no access to a resource will not receive onSync events from SharedObjects.

Client.referrer returns the URL of the client that originated the connection. An embedded SWF file returns the URL of the page it is embedded in.

Client.writeaccess sets the "read" and listen security access level (or folder) for SharedObjects and streams.

Client Events

Client."commandName"([p1, , pN])

SSAS methods that can be called remotely by the Flash player or connected server using the NetConnection.call() method.

p1, ..., pN Custom parameters sent by the client to this server method.


Macromedia Flash Communication Server MX
Macromedia Flash Communication Server MX
ISBN: 0735713332
EAN: 2147483647
Year: 2002
Pages: 200
Authors: Kevin Towes

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net