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

Using the Flash Remoting ActionScript API in the CustomerInfoExampleAPI application 51
Establishing the connection in the HTML file enables you to change it without needing to
republish the application.
After creating the
custService Service object, CustomerInfoFormAPI() calls the custService.
getCatergories()
function to retrieve a record set of all categories, sets the alignment for the
Total Sales label on the DataGrid component, and assigns a RelayResponder object to the
responder property of the pc PendingCall object for the call to getCategories(). The
RelayResponder specifies the object (
this), the result handling method (“onCategoryData”),
and the fault handling method (“
onCategoryFault”) that will handle the result or fault
condition returned by the
getCategories() function. RelayResponder calls
addEventListener() to register the onReveal() method, the method to call when a reveal
event occurs.
onReveal()
The
onReveal() function performs initialization tasks for the CustomerInfoFormAPI class if the
initialization variable is not equal to true. These tasks include defining the columns ("ID",
"Active", "Name", and "TotalSales") for the DataGrid component that displays the customer
information returned from the customer’s database. The next line, shown here, registers the
onCustGrid_Change() function as the event handler to be called if a change occurs in the
customers_grd DataGrid component.
customers_grd.addEventListener( "change", onCustGrid_Change );
Next, the onReveal() function aligns text for the Total and the Total Sales labels and sets the
initialized variable to true.
updateDetails()
The
updateDetails() function updates the data displayed in the Customer Details section
when the customer selected in the DataGrid component changes. This information includes the
customer description, the Total Sales amount, and the logo. This function is called by the
onCustGrid_Change() function.
refreshCustomerData()
The
refreshCustomerData() function calls the getCustomers() function of the customerData
service (referenced as
custService) to retrieve the customers for the selected item in the
Category ComboBox component.
This function calls the RelayResponder constructor to establish the
onCategoryData() function
as the function to receive the results of this call, and the
onCategoryFault() function as the
function to receive an error or fault condition.
onCustGrid_Change()
The
onCustGrid_Change() function is the event handler that is called when the selection in the
DataGrid component changes. This function calls the
NetDebug.trace() function to
documents the call to this function. Then it calls the
updateDetails() function to update the
Customer Details section.