MACROMEDIA FLASH REMOTING MX-USING FLASH REMOTING FOR FLASH MX 2004 ACTIONSCRIPT 2.0 Use Manual page 107

Using flash remoting for flash mx 2004 actionscript 2.0
Table of Contents

Advertisement

The order in which you specify the
which the parameters are passed from ActionScript. For example, the following ActionScript call
passes three parameters:
CFCService.functA(a, b, c);
The corresponding ColdFusion component defines three arguments, including the data type of
the parameter:
<cfcomponent>
<cffunction ...>
<cfargument name="arg_for_a" type="type_of_a">
<cfargument name="arg_for_b" type="type_of_b">
<cfargument name="arg_for_c" type="type_of_c">
</cffunction ...>
</cfcomponent>
For information on how ActionScript data types are converted to ColdFusion data types, see
Chapter 4, "Using Flash Remoting Data in ActionScript," on page
The following table describes using the
Collection
ActionScript example
Strict array
var myArray:Array = new Array();
myArray[0] = "zero";
myArray[1] = "one";
myService.myMethod(myArray);
Named or
var myStruct:Array = new Array();
myStruct["zero"] = "banana";
associative
myStruct["one"] = "orange";
array
myService.myMethod(myStruct);
Named
myService.myMethod({x:1, y:2,
z:3});
arguments
using object
initializer
tags in the function corresponds to the order in
cfargument
tag to access parameters:
cfargument
Notes
The Flash Remoting service converts the
array argument to a ColdFusion MX array. All
CFML array operations work as expected.
<cffunction ...>
<cfargument name="arg1" type="array">
<cfset p1=arg1[1]>
<cfset p2=arg1[2]>
</cffunction ...
In ActionScript, named array keys are not
case sensitive.
<cffunction ...>
<cfargument name="arg1" type="struct">
<cfset p1=arg1.zero>
<cfset p2=arg1.one>
</cffunction ...
Provides a convenient way of passing named
arguments to ColdFusion pages. Access
these arguments as normal named
arguments of a component function.
<cffunction ...>
<cfargument name="x" type="numeric">
<cfargument name="y" type="numeric">
<cfargument name="z" type="numeric">
<cfset p1=x>
<cfset p2=y>
<cfset p3=z>
</cffunction ...>
Using Flash Remoting with ColdFusion components
63.
>
>
107

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH REMOTING MX-USING FLASH REMOTING FOR FLASH MX 2004 ACTIONSCRIPT 2.0 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash remoting mx

Table of Contents