User Guide
Table Of Contents
- Contents
- About Flash Remoting
- Getting Started
- Using Flash Remoting ActionScript
- Using the RemotingConnector component (Flash Professional only)
- Using Flash Remoting Data in ActionScript
- About Flash Remoting and data types
- Understanding Action Message Format
- Converting from ActionScript to application server data types
- Converting from application server data types to ActionScript
- ColdFusion to ActionScript data conversion issues
- About working with objects
- About working with RecordSet objects
- About working with XML
- The NetConnection Debugger
- Using Flash Remoting with ColdFusion MX
- Using Flash Remoting for Java
- About Flash Remoting for Java
- Calling Java classes or JavaBeans from ActionScript
- Calling Enterprise JavaBeans (EJBs) from Flash
- Calling servlets and JSPs from Flash
- Calling JMX MBeans from Flash (JRun only)
- Calling server-side ActionScript from Flash (JRun only)
- Handling function results in ActionScript
- Using Flash Remoting with JRun security
- Passing XML objects between Flash and Java
- Viewing Flash Remoting log entries
- Using Flash Remoting for Microsoft .NET
- Flash Remoting for Microsoft .NET
- Calling ASP.NET pages from Flash
- Making an ASP.NET page available to Flash Remoting
- Getting a reference to an ASPX-based service in ActionScript
- Invoking ASPX pages in ActionScript
- Using the Flash Remoting custom server control in ASPX pages
- Using the Flash Remoting namespace in code-behind files
- Using ASP.NET state management with Flash Remoting
- Using ASP.NET exception handling
- Using ADO.NET objects with Flash Remoting
- Displaying a RecordSet object in Flash with ActionScript
- Calling web services from Flash
- Calling ASP.NET assemblies from Flash
- Viewing Flash Remoting log entries
- Using NetServices and Connection Classes
- Index

118 Chapter 6: Using Flash Remoting with ColdFusion MX
To simplify the debugging of your ColdFusion code, use the cftry and cfcatch tags in your
ColdFusion page or component to catch errors and return helpful error messages about the errors
to the Flash application. For example, the ColdFusion page causeError.cfm contains the following
code:
<cftry>
<cfset dev = Val(0)>
<cfset Flash.Result = (1 / dev)>
<cfcatch type="any">
<cfthrow message="An error occurred in this service: #cfcatch.message#">
</cfcatch>
</cftry>
In this example, the second cfset tag fails because it causes a divide-by-zero error. The message
attribute of the
cfthrow tag describes the error; ColdFusion returns this attribute to the Flash
application. For more information on using the
cftry and cfcatch tags, see Developing
ColdFusion MX Applications with CFML.
To handle the error in your Flash application, you create a fault handler for the
causeError()
method, as follows:
import mx.rpc.FaultEvent;
//…
function causeError_Fault ( fault:FaultEvent ):Void
{
resultBox.text = fault.fault.faultstring;
}
In this example, resultBox is a Flash text box that displays the error message created by the
cfthrow tag.
For more information on handling errors, see Chapter 2, “Using Flash Remoting ActionScript,”
on page 29.