|NetServices Object||Flash 6|
|simplifies connection management|
Creates a NetConnection object to allow connection to remote services through the Flash Remoting adapter on the server.
Returns the current version number of the NetServices object (currently 1.0).
Sets a default URL for a NetConnection object.
The NetServices object abstracts some of the NetConnection class's functionality for easy access to the developer. Using the simple methods of the NetServices object, you can set up a gateway URL and create the NetConnection object. The NetServices object also aids in the creation of callback functions for remote services and creates proxies for the remote connections.
The NetServices object is included when you include the NetServices.as file in your Flash movie:
You use the NetServices object directly; you don't construct an instance of the object. Typically, you use it to specify a default URL and create a NetConnection object:
NetServices.setDefaultGatewayUrl("http://127.0.0.1/flashservices/gateway"); var my_conn = NetServices.createGatewayConnection( );
Once you use the NetServices object to set up an instance of a NetConnection object, you should not have to use the NetServices object anymore. The benefit of using the NetServices object is that you have more control over your connection and responder objects. This is discussed in the individual method sections for NetServices in this chapter.
The NetConnection class; Chapter 4