You want to call a service function from a Flash movie (see Table 20-1 for Flash Remoting service function types).
service object by invoking
method from the connection object returned by
createGatewayConnection( ). The service object
is the object returned by
getService( ). Then
service function (any function defined
for the service) as a method of the service object.
#include "NetServices.as" NetServices.setDefaultGatewayURL("http://localhost/flashservices/gateway"); myConnection = NetServices.createGatewayConnection( );
Once you have created the connection object, you can create an object
that maps to any service available through the specified gateway
getService( ) method. There are two
variations when using the
getService( ) method.
In the first variation, you specify a single response object to
handle responses from all functions invoked on the object. In the
second variation, instead of specifying the response object when
getService( ), you specify it as the
first parameter each time you invoke a service function.
Both variations require that you provide the name of the service as it is known to the Flash Remoting gateway. A service is known by the URL that accesses the ...