MACROMEDIA FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE Reference page 105

Server-side actionscript language reference
Table of Contents

Advertisement

NetConnection.call()
Availability
Flash Communication Server MX 1.0.
Usage
myNetConnection.call(methodName, [resultObj, p1, ..., pN])
Parameters
A method specified in the form
. For example, the
methodName
[objectPath/]method
command
tells the remote server to invoke the
someObj/doSomething
method, with all the
parameters. If the
clientObj.someObj.doSomething
p1, ..., pN
object path is missing,
is invoked on the remote server.
clientObj.doSomething()
An optional parameter that is used to handle return values from the server. The
resultObj
result object can be any object you defined and can have two defined methods to handle the
returned result:
and
. If an error is returned as the result,
is
onResult
onStatus
onStatus
invoked; otherwise,
is invoked.
onResult
Optional parameters that can be of any ActionScript type, including a
p1, ..., pN
reference to another ActionScript object. These parameters are passed to the
methodName
specified above when the method is executed on the remote application server.
Returns
For RTMP connections, returns a Boolean value of
if a call to
is sent to the
true
methodName
client; otherwise,
. For application server connections, it always returns
.
false
true
Description
Method; invokes a command or method on a Flash Media Server or an application server to
which the application instance is connected. The
method on the server
NetConnection.call
works the same way as the
method on the client: it invokes a command
NetConnection.call
on a remote server.
If you want to call a method on a client from a server, use the
method.
Client.call()
Example
The following example uses RTMP to execute a call from one Flash Media Server to another
Flash Media Server. The code makes a connection to the App1 application on server 2 and
then invokes the method
on server 2:
Sum
nc1.connect("rtmp://server2.mydomain.com/App1", "svr2",);
nc1.call("Sum", new Result(), 3, 6);
NetConnection class
105

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash media server 2

Table of Contents