ActionScript 1.0 and CFML are both loosely typed languages. There is a close correlation between ActionScript datatypes and ColdFusion datatypes, but there are a few notable differences. Table A-1 shows the conversion from Flash ActionScript to ColdFusion.
Flash (ActionScript) |
ColdFusion (CFML) |
---|---|
ActionScript object |
Struct (or ASObject) |
ActionScript object (as only argument) |
Named arguments |
Array (indexed) |
Array |
Associative Array |
Struct |
Boolean |
Boolean |
Date Object |
Date |
Number |
Number |
RecordSet |
- |
String |
String |
Undefined |
Null |
XML Object |
XML document |
Null |
Null |
Table A-2 shows the conversion from ColdFusion to Flash ActionScript.
ColdFusion (CFML) |
Flash (ActionScript) |
---|---|
Struct |
Associative array |
Java object (flashgateway.IO.ASObject) |
ActionScript object |
Java object (flashgateway.IO.ASObject with type property set) |
ActionScript object of that type |
Array |
Array (indexed) |
Struct |
Array (associative) |
Boolean |
String [1] |
Date |
Date object |
Number |
Number |
Query object |
RecordSet |
String |
String |
XML document |
XML object |
Null |
Null |
[1] Booleans should be passed as numbers (1 or 0) from ColdFusion to Flash. A 1 will be passed as "true" to Flash, and anything else will pass as "false". For that reason, ColdFusion Booleans are not accurately returned to Flash.