• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

NetConnection.close( ) Method > NetConnection.close( ) Method

Name

NetConnection.close( ) Method

Synopsis

                     myNetConnectionObject.close( )

Description

The close( ) method is used to close a connection to the Flash Remoting server. A connection is not a physical connection to the server, so this method does not physically close anything. It merely sets the URL of the NetConnection object to null, thereby causing any further attempts to connect to the server to fail.

Example

The following code shows the basic syntax of the close( ) method:

if (connected == null) {
  connected = true;
  NetServices.setDefaultGatewayUrl("http://127.0.0.1/flashservices/gateway");
  var my_conn = NetServices.createGatewayConnection( );
  var verified = myLoginService( );
  if (!verified) my_conn.close( );
}

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint