Checking For A Flash Remoting Service Connection; About The Cf.http Function - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

Reviewing the code
The following table describes the code and its function:
Code
function search_Result
(resultset)
dataView.setDataProvider
(resultset);
status.text = (0+resultset.
getLength())+" names found.";

Checking for a Flash Remoting service connection

To ensure that the Flash movie is connected to the Flash Remoting service, you use an
statement; for example:
if (inited == null)
{
inited = true;
NetServices.setDefaultGatewayUrl("http://localhost:8500/flashservices/
gateway");
gateway_conn = NetServices.createGatewayConnection();
directoryService = gateway_conn.getService(personneldirectory, this);
status.text = "Type into the text boxes, then click 'Search'";
}
In this example, the
the movie connects to the Flash Remoting service using the NetServices object. For more
information about connecting to the Flash Remoting service, see
Remoting service" on page

About the CF.http function

You use the
CF.http
using HTTP
Get
Using the
Get
common for a one-way transaction in which the
the contents of a web page.
The
method can pass variables to a form or CGI program, and can also create HTTP
Post
cookies.
The most basic way to use the
retrieve a page from a specified URL. The
The following server-side example retrieves file content from the specified URL:
function basicGet(url)
{
// Invoke with just the url argument. This is an HTTP GET.
result = CF.http(url);
return result.get("Filecontent");
}
variable is evaluated for a value. If
inited
654.
ActionScript function to retrieve information from a remote HTTP server
and
methods, as follows:
Post
method, you send information to the remote server directly in the URL. This is
CF.http
Description
The
suffix tells the Flash Remoting service to
_Result
return the results of the search function to this function.
Assigns the results returned by the Flash Remoting
service to the
dataView
Displays the number of records returned by the Flash
Remoting service.
function retrieves an object, such as
CF.http
function is to use it with the
method is the default for the
Get
list box.
is
(not connected),
inited
null
"Connecting to the Flash
method argument to
Get
CF.http

About the CF.http function

if
function.
663

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion mx

Table of Contents