Client.call - MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Manual

Server-side communication actionscript dictionary
Table of Contents

Advertisement

Example
The following example checks the
code depending on whether they match. This code is written inside an
function onConnect(newClient, name){
if (newClient.agent.indexOf("WIN") > -1){
trace ("Window user");
} else {
trace ("non Window user.agent is" + newClient.agent);
}
}

Client.call

Availability
Flash Communication Server MX.
Usage
Client.call(methodName, [resultObj, [p1, ..., pN]])
Parameters
A method specified in the form
methodName
command
someObj/doSomething
NetConnection.someObj.doSomething
An optional parameter that is required when the sender expects a return value from
resultObj
the client. If parameters are passed but no return value is desired, pass the value
object can be any object you define and, in order to be useful, should have two methods that are
invoked when the result arrives:
triggered if the invocation of the remote method is successful; otherwise, the
resultObj.onStatus
Optional parameters that can be of any ActionScript type, including a reference
p1, ..., pN
to another ActionScript object. These parameters are passed to the
the method executes on the Flash client. If you use these optional parameters, you must pass in
some value for
resultObject
Returns
A Boolean value of
Description
Method; executes a method on the originating Flash client or on another server. The remote
method may optionally return data, which is returned as a result to the
is provided. The remote object is typically a Flash client connected to the server, but it can also be
another server. Whether the remote agent is a Flash client or another server, the method is called
on the remote agent's NetConnection object.
Example
The following example shows a client-side script that defines a function called
generates a random number:
nc = new NetConnection();
nc.connect ("rtmp://someserver/someApp/someInst");
nc.random = function(){
return (Math.random());
};
property against the string
agent
tells the client to invoke the
method on the client.
onResult
event is triggered.
; if you do not want a return value, pass
if a call to
true
methodName
[objectPath/]method
and
. The
onStatus
resultObj.onResult
was successful on the client; otherwise,
Server-Side Communication ActionScript
and executes different
"WIN"
function.
onConnect
. For example, the
. The result
null
event is
parameter when
methodName
.
null
false
parameter, if it
resultObj
, which
random
.
27

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash communication server mx

Table of Contents