ColdFusion Datatype Conversion
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 |
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. | |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access