User Guide

Table Of Contents
812 Chapter 33: Using the Flash Remoting Service
Using the Flash Remoting service with ColdFusion pages
When you build a ColdFusion page that interacts with a Flash application, the directory name
that contains the ColdFusion pages translates to the service name that you call in ActionScript.
The individual ColdFusion page names within that directory translate to service functions that
you call in ActionScript.
Note: Flash Remoting cannot interact with virtual directories accessed through a ColdFusion
mapping.
In your ColdFusion pages, you use the Flash variable scope to access parameters passed to and
from a Flash application. To access parameters passed from a Flash application, you use the
parameter name appended to the
Flash scope or the Flash.Params array. To return values to the
Flash application, use the
Flash.Result variable. To set an increment value for records in a
query object to be returned to the Flash application, use the
Flash.Pagesize variable.
The following table shows the variables contained in the Flash scope:
The following table compares the ColdFusion MX data types and their ActionScript equivalents:
Variable Description For more information
Flash.Params Array that contains the parameters
passed from the Flash application. If
you do not pass any parameters,
Flash.params still exists, but it is
empty.
See “Accessing parameters passed from
Flash” on page 813.
Flash.Result The variable returned from the
ColdFusion page to the Flash
application that called the function.
Note: Because ActionScript
performs automatic type
conversion, do not return a Boolean
literal to Flash from ColdFusion.
Return
1 to indicate true, and return
0 to indicate false.
See “Returning results to Flash
on page 815.
Flash.Pagesize The number of records returned in
each increment of a record set to a
Flash application.
See “Returning records in increments to
Flash” on page 816.
ActionScript data type ColdFusion MX data type
Number (primitive data type) Number
Boolean (primitive data type) Boolean (0 or 1)
String (primitive data type) String
ActionScript Object Structure
ActionScript Object (as the
only argument passed to a
service function)
Arguments of the service function. ColdFusion pages (CFM files):
flash variable scope, ColdFusion components (CFC files): named
arguments
Null Null (
Asc() returns 0, which translates to not defined)