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

NetConnection.ReplaceGatewayUrl( ) Metho... > NetConnection.ReplaceGatewayUrl( ) M...

Name

NetConnection.ReplaceGatewayUrl( ) Method

Synopsis

                     myNetConnectionObject.ReplaceGatewayUrl(targetURL)

Arguments

targetURL

A URL of the Flash Remoting gateway that you wish to connect to. The URL must be prepended with an http:// or https:// protocol.

Description

The ReplaceGatewayUrl( ) method is used to change the Flash Remoting gateway URL previously specified via NetConnection.connect( ), NetServices.createGatewayConnection( ), or NetServices.setDefaultGatewayUrl( ). Using the ReplaceGate-wayUrl( ) method requires the inclusion of the NetServices.as file.

Example

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

#include "NetServices.as"
if (connected == null) {
  // Initialize the variable so this section is only called once
  connected = true;
  // Create the NetConnection object
  gatewayURL = "http://www.flash-remoting.com/flashservices/gateway";
  var my_conn = NetServices.createGatewayConnection(gatewayURL);
}

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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