4
Contents
Handling service results and errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Using the RelayResponder object for a service . . . . . . . . . . . . . . . . . . . . . . . . . 44
Using PendingCall and RelayResponder objects for a specific service function . 45
Using the ResultEvent class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Using the FaultEvent class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Using the Flash Remoting ActionScript API in the
CustomerInfoExampleAPI application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
onReveal() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
updateDetails() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
refreshCustomerData() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
onCustGrid_Change() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
onCustCat_Change() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
onCategoryData(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
onCustomerData() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
onCustomerFault() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
onCategoryFault() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
CHAPTER 3:
Using the RemotingConnector component
(Flash Professional only)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
RemotingConnector parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Creating an instance of the RemotingConnector component . . . . . . . . . . . . . . 56
Using the RemotingConnector in the CustomerInfoExampleCon application. . . . 57
onReveal() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
updateDetails() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
onCustGrid_Change() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
onCustomerData() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
onCategoryData(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
onCustomerDataFault() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
onCategoryDataFault(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
CHAPTER 4:
Using Flash Remoting Data in ActionScript
. . . . . . . . . . . . . . . . . . 63
About Flash Remoting and data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Understanding Action Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Converting from ActionScript to application server data types . . . . . . . . . . . . . . . 65
Converting from application server data types to ActionScript . . . . . . . . . . . . . . . 67
ColdFusion to ActionScript data conversion issues . . . . . . . . . . . . . . . . . . . . . . . . 69
About working with objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Working with ActionScript typed objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Working withJava serializable objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
About working with RecordSet objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
About record sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
RecordSet methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Using RecordSet methods and properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Delivering RecordSet data to Flash applications in ColdFusion MX . . . . . . . . . 81
Using Flash UI components with RecordSet objects . . . . . . . . . . . . . . . . . . . . . 83
About working with XML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85