NetConnection.connect

Availability

Usage

connectionObject.connect(targetURL)

Parameters

Parameter
Description
targetURL
The Flash Remoting URL
[protocol://] host [:port] /appName
The value of appName depends on the type of gateway and the particular configuration of Flash Remoting MX. For more information, see "Identifying the gateway".
If you omit protocol://, Flash assumes you want to connect to an application server using the nonsecure http:// protocol.
For example, the following URLs are formatted correctly:
  • http://localhost:8500/flashservices/gateway
  • https://www.myCompany.com/myMainDirectory/securegateway.aspx/flashremoting/gateway

Return value

A Boolean value of true if the protocol part of the URL (the http: or https:) is valid, false otherwise.

Description

Method. Defines the Flash Remoting URL that is used during Flash Remoting service function calls. This method does not communicate with the server. When Flash Remoting MX executes a service function call, it makes an HTTP or HTTPS connection to the application servers. This connection only persists until the results of the call are returned to the Flash application.

Example

The following example configures the connection information for Flash Remoting MX to access the mySite server:

gatewaycon = new NetConnection();
gatewaycon.connect("http://www.mySite.com/flashservices/gateway");

See also

NetConnection.close

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flashremoting/mx/Using_Flash_Remoting_MX/asDict13.htm