After you connect to the Flash Remoting service, you call functions that are defined in your server-side ActionScript, and return results.
For more information, see the following sections:
To access the server-side ActionScript, first you must create an instance of it so it can be invoked in your client-side ActionScript. To create an instance of your server-side ActionScript, use the gatewayConnection.getService function; for example:
albumService = gatewayConnection.getService("recordsettest", this)
In the example, recordsettest represents the name of the server-side ActionScript file, without the file extension .asr.
To use the functions in a server-side ActionScript, you use dot notation to specify the object name name followed by the function name; for example:
albumService.getAlbum("The Color And The Shape", "1999");
In the example, albumService is the instance of the server-side ActionScript and getAlbum is a function that passes two arguments, "The Color and The Shape" and "1999".
Note: Arguments must occur in the order defined in the function declaration.