Using Flash Remoting Update - Adobe 38043740 - ColdFusion Standard - Mac Development Manual

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Flex and AIR Integration in ColdFusion
The second
tag in this example fails because it tries to divide by zero (0)
cfset
tag describes the error; ColdFusion returns this attribute to the SWF application.
To handle the error in your SWF application, create a fault handler like
import mx.remoting.*;
import mx.services.Log;
import mx.rpc.*;
// Connect to service and create service object
var CFMService:Service = new Service(
"http://localhost/flashservices/gateway",
null,
"helloExamples",
null,
null );
// Call the service causeError() method
var pc:PendingCall = CFMService.causeError();
// Tell the service what methods handle result and fault conditions
pc.responder = new RelayResponder( this, "causeError_Result", "causeError_Fault" );
function causeError_Result(re:ResultEvent)
{
// Display successful result
messageDisplay.text = re.result;
}
function causeError_Fault(fe:FaultEvent)
{
// Display fault returned from service
trace("Error message from causeError is: " + fe.fault.description);
}
This example displays the trace message from the
of the message that is contained in
in the causeError.cfm page.
#cfcatch.message#
Note: When you create a ColdFusion page that communicates with Flash, ensure that the ColdFusion page works before
using it with Flash.

Using Flash Remoting Update

You can use Flash Remoting Update to create Rich Internet Applications by using Adobe ColdFusion with Adobe
Flash Builder or earlier versions of Flex Builder, with the advanced data retrieval features of ColdFusion, such as the
,
, and
cfpop
cfldap
cfquery
files that contain features, such as server call backs and customized user interface.
Prerequisites for using Flash Remoting Update
You can use Flash Remoting Update with all configurations of ColdFusion (server, multiserver, and J2EE) on all the
platforms that ColdFusion supports.
To use Flash Remoting Update, you must have the following installed:
• Flex 2 SDK or later, Flex Builder 2 or later, Flash Builder 4.
causeError_Fault
fe.fault.description
tags. In addition, you can use Flash Remoting Update to create Flash Forms and SWF
Last updated 1/20/2012
The
.
message
causeError_Fault
function in the Flash Output panel. The portion
is the portion of the message that is contained in
619
attribute of the
cfthrow
in the following example:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents