User Guide
Table Of Contents
- Contents
- About Flash Remoting
- Getting Started
- Using Flash Remoting ActionScript
- Using the RemotingConnector component (Flash Professional only)
- Using Flash Remoting Data in ActionScript
- About Flash Remoting and data types
- Understanding Action Message Format
- Converting from ActionScript to application server data types
- Converting from application server data types to ActionScript
- ColdFusion to ActionScript data conversion issues
- About working with objects
- About working with RecordSet objects
- About working with XML
- The NetConnection Debugger
- Using Flash Remoting with ColdFusion MX
- Using Flash Remoting for Java
- About Flash Remoting for Java
- Calling Java classes or JavaBeans from ActionScript
- Calling Enterprise JavaBeans (EJBs) from Flash
- Calling servlets and JSPs from Flash
- Calling JMX MBeans from Flash (JRun only)
- Calling server-side ActionScript from Flash (JRun only)
- Handling function results in ActionScript
- Using Flash Remoting with JRun security
- Passing XML objects between Flash and Java
- Viewing Flash Remoting log entries
- Using Flash Remoting for Microsoft .NET
- Flash Remoting for Microsoft .NET
- Calling ASP.NET pages from Flash
- Making an ASP.NET page available to Flash Remoting
- Getting a reference to an ASPX-based service in ActionScript
- Invoking ASPX pages in ActionScript
- Using the Flash Remoting custom server control in ASPX pages
- Using the Flash Remoting namespace in code-behind files
- Using ASP.NET state management with Flash Remoting
- Using ASP.NET exception handling
- Using ADO.NET objects with Flash Remoting
- Displaying a RecordSet object in Flash with ActionScript
- Calling web services from Flash
- Calling ASP.NET assemblies from Flash
- Viewing Flash Remoting log entries
- Using NetServices and Connection Classes
- Index

52 Chapter 2: Using Flash Remoting ActionScript
The onReveal() function calls the addEventListener() function to establish this function as
the event handler for the
customers_grd DataGrid component.
onCustCat_Change()
The
onCustCat_Change() function is the event handler that is called when the selection in the
Category ComboBox component changes. It calls the
refreshCustomerData() function to
retrieve the customers for the selected category.
The
onCategoryData() function calls the addEventListener() function to register this
function as the event handler for the
cust_Cat_cmbo ComboBox component.
onCategoryData()
The
onCategoryData() function handles the result of a call to the custService.
getCategories()
function. The CustomerInfoFormAPI() function named this function as the
result handler for the
getCategories() function.
This function first calls the
NetDebug.trace() function to document the call to this function.
Then it calls the
DataGlue.bindFormatStrings() function to make the Name field the label that
appears in the ComboBox component and make the ID field the data field for the record. The
call to
addEventListener() makes the onCustCat_Change() function the event handler when a
change occurs to the selection in the
custCat_cmbo ComboBox component. This function calls
the
refreshCustomerData() function to display the customers in the current category.
onCustomerData()
The
onCustomerData() function handles the results of the call to the custService.
getCustomers()
function in the refreshCustomer() function. This function assigns the result
of the call to the
getCustomers() function to the rs record set. It sets the delivery mode to
onDemand, which means that the server will deliver records for this record set in groups of up to
25 records for each call to the
getCustomers() function. Next, this function loads the length of
the returned record set into
totalRec_txt.text variable for display in the Total field of the user
interface. Then it sets
customers_grd.dataProvider to rs to specify that rs provides the data
for the grid. Finally, it calls the
updateDetails() function to update the Customer Details
section for the selected customer.
onCustomerFault()
The
onCustomerDataFault() function handles the fault outcome of a request for customer data.
It calls
Alert() to notify the user of the problem and then calls the NetDebug.trace() function
to display a message and report the status as specified by the
faultstring property of the Fault
object that is passed to the function in a FaultEvent object.
onCategoryFault()
The
onCategoryDataFault() function handles the fault outcome of a request for Category data.
It calls
Alert() to notify the user of the problem and then calls the NetDebug.trace() function
to display a message and report the status as specified by the
faultstring property of the Fault
object that is passed to the function in a FaultEvent object.