How do I make service calls to an application server from a Macromedia Flash movie?
To make service calls to an application server using Flash Remoting, you must first create a service object in your Flash movie using the NetServices functions createGatewayConnection and getService to create a connection object. The following code example creates a service object named myService: #include “NetServices.as” if (inited == null) { // do this code only once inited = true; // set the default gateway URL (this is used only in authoring) NetServices.setDefaultGatewayUrl(“http://localhost:8100/flashservices/gateway”); // connect to the gateway gateway_conn = NetServices.createGatewayConnection(); // get a reference to a service myService = gateway_conn.getService(“my.service”, this); } As the example shows, you can use the setDefaultGatewayUrl function to specify a Flash Remoting service URL for all service calls in the Flash movie. However, the setDefaultGatewayUrl function should only be used in the Macromedia Flash authoring environment. The service name, my.service, transl