User Guide

Table Of Contents
Using Flash Remoting with ColdFusion pages 99
The Flash scope has several predefined variables that you can use to pass information, as described
in the following table:
When you call a ColdFusion page from a Flash application, the Flash Remoting gateway converts
ActionScript data types to ColdFusion data types. The data type of any results returned from
ColdFusion to the Flash application are converted to ActionScript data types. For more
information on this conversion, see Chapter 4, “Using Flash Remoting Data in ActionScript, on
page 63.
Using Flash.Params to access parameters in a ColdFusion page
The
Flash.Params array contains one element for each parameter passed from ActionScript, in
the order that the parameters were passed to the ColdFusion page. You use standard ColdFusion
array syntax to reference the parameters.
For example, the following ActionScript call passes three parameters:
myService.myMethod(param1, param2, param3);
In your ColdFusion page, you access these parameters using Flash.Params, as follows:
<cfset p1=Flash.Params[1]>
<cfset p2=Flash.Params[2]>
<cfset p3=Flash.Params[3]>
The following ActionScript code calls a ColdFusion page to execute a query. The ActionScript
passes a single parameter to the ColdFusion page:
myService = new Service(
"http://localhost/flashservices/gateway",
null,
"doc_code",
null,
null);
var pc:PendingCall = myService.query1param("RipperStik");
Variable Description For more information
Flash.Params
Array containing the parameters passed from the
Flash application to the ColdFusion page. If you do
not pass any parameters,
Flash.Params still exists,
but it is empty.
See “Using Flash.Params to
access parameters in a
ColdFusion page”
on page 99.
Flash.Result
Result returned to the Flash application from the
ColdFusion page.
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
ActionScript” on page 102.
Flash.Pagesize
Number of records in each increment of a record
set returned to Flash from a ColdFusion page.
See “Returning record sets to
Flash” on page 103.