User Guide
Using Flash Remoting Update 11
The CFC contains two functions: logoutuser and getData. The getData function
authenticates the user against the flexadmin role and returns a string.The logoutuser function
calls the <cflogout> tag to log the user out on the server.
<cfcomponent>
<cffunction name="logoutuser" access="remote">
<cflogout>
</cffunction>
<cffunction name="getData" access="remote" roles="flexadmin">
<cfreturn "Some Secure Data!">
</cffunction>
</cfcomponent>
Data translation
The following table lists the ColdFusion data types and the corresponding ActionScript data
type:
TIP
To make communication between the Flex application and the CFC secure, you can
specify that the AMF channel in the ColdFusion destination definiton be secure in the
WEB-INF\flex\services-config.xml file.
ColdFusion data type Flash data type
String String
Array [] = Array
Struct {} = untyped Object
Query Array of untyped Objects
CFC Class = typed Object (if a matching ActionScript class
exists, otherwise the CFC becomes a generic untyped
Object (map) in ActionScript)
CFC Date ActionScript Date
CFC String ActionScript String
CFC Numeric ActionScript Numeric
ColdFusion XML Object ActionScript XML Object