Adobe COLDFUSION 9 Manual page 617

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Flex and AIR Integration in ColdFusion
ActionScript data type
ActionScript Object
ActionScript Object (as the only argument passed to a service
function)
Null
Undefined
Ordered array
Note: ActionScript array indexes start at zero (for example:
my_ASarray[0]).
Named (or associative) array
Date object
XML object
RecordSet
Also, remember the following considerations regarding data types:
• If a string data type on the server represents a valid number in ActionScript, Flash can automatically cast it to a
number if needed.
• To return multiple, independent values to the SWF application, place them in a complex variable that converts to
a Flash Object, Array, or Associative Array, that can hold all of the required data. Return the single variable and
access its elements in the SWF application.
For a complete explanation of using Flash Remoting data in ActionScript, see Using Flash Remoting MX 2004Help.
Accessing parameters passed from Flash
To access variables passed from SWF applications, you append the parameter name to the Flash scope or use the
array. Depending on how the values were passed from Flash, you refer to array values using ordered
Flash.Params
array syntax or structure name syntax. Only ActionScript objects can pass named parameters.
For example, if you pass the parameters as an ordered array from Flash
the parameters as named parameters, you use standard structure-name syntax like
You can use most of the CFML array and structure functions on ActionScript collections. However, the
CFML function does not work with ActionScript collections. The following table lists ActionScript collections and
describes how to access them in ColdFusion:
ColdFusion data type
Structure
Arguments of the service function. ColdFusion pages (CFM files):
variable scope, ColdFusion components (CFC files): named arguments
Null (
Asc()
returns 0, which translates to not defined)
Null (
returns 0, which translates to not defined)
Asc()
Array
Note: ColdFusion array indexes start at one (for example: my_CFarray[1]).
Struct
Date
XML document
Query object (when returned to a SWF application only; you cannot pass a
RecordSet from a SWF application to a ColdFusion application)
,array[1]
Last updated 8/5/2010
flash
references the first value. If you pass
.
params.name
StructCopy
612

Advertisement

Table of Contents
loading

Table of Contents