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

Handling errors with ColdFusion 117
<!--- Verify user name from cflogin.name and password from
cflogin.password
using your authentication mechanism. For example, you might store this
information in an LDAP database. --->
>
<cfif cflogin.name eq "bob">
<!--- In this example, bob is in the role of administrator. Typically, you
store user roles with authentication information. --->
<cfloginuser name="#cflogin.name#" password="#cflogin.password#"
roles="Admin">
</cfif>
</cflogin>
</cfsilent>
This example does not show how to perform user verification. For more information on
verification, see Developing ColdFusion MX Applications with CFML.
Assigning security roles to component functions
ColdFusion components offer roles-based security. The following example creates a component
method that deletes files:
<cfcomponent>
<cffunction name="deleteFile" access="remote" roles="admin,manager">
<cfargument name="filepath" required="yes">
<cffile action="DELETE" file=#arguments.filepath#>
</cffunction>
</cfcomponent>
In the example, the cffunction tag includes the roles attribute to specify the user roles allowed
to access it. In this example, only users in the admin and manager role can access the function.
Multiple roles are delimited with a comma.
In the Application.cfm file, you use the
cfloginuser tag to log in the user and assign the user to
a role. The user must be assigned to the correct role to access the component function. For more
information on roles, see Developing ColdFusion MX Applications with CFML.
Handling errors with ColdFusion
ColdFusion pages and components can return error information to a Flash application if the
ColdFusion code fails. For example, the following Flash application calls a ColdFusion page
named causeError.cfm:
import mx.remoting.Service;
//…
var CFMService:Service = new Service(
"http://localhost/flashservices/gateway",
null,
"errorExample",
null,
null);
CFMService.causeError();