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

82 Chapter 4: Using Flash Remoting Data in ActionScript
Flash Remoting can deliver pageable record set data to your application in three modes, as
described in the following table:
You change a RecordSet object’s delivery mode by calling the
setDeliveryMode() method, as in
the following example:
function getCustomerData_Result( dataEvent:mx.rpc.ResultEvent ):Void {
if (config_panel.deliveryMode.getData() == "page")
{
theRecordSet.setDeliveryMode("page", contact_grid.getRowCount(), 1);
}
else if (config_panel.deliveryMode.getData() == "fetchAll")
{
theRecordSet.setDeliveryMode("fetchAll", 10);
}
else
{
theRecordSet.setDeliveryMode("onDemand");
}
}
In this example, theRecordSet object represents the record set returned from Flash Remoting, and
the
config_panel object represents a Flash movie clip. Using the deliveryMode.getData()
method, the code evaluates the delivery mode specified by
config_panel, and uses the
setDeliveryMode() method to set the mode of delivery for the RecordSet object.
Data delivery
modes
Description
ondemand
(default)
When you access a particular record using the
getItemAt() method, the
RecordSet object requests the record from the server-side Flash Remoting
RecordSet service.
page When you use the
getItemAt() method to access a record, the RecordSet object
fetches data one or more pages at a time.
You specify the number of records per page when you set the delivery mode. The
default page size is 25 records.
You can also tell Flash Remoting to get, or prefetch, a number of pages of data
that follow the page that contains the requested data. Flash Remoting stores
these additional pages in the client if it has not already fetched them in a previous
request. The default prefetch value is 0 (only get the page with the requested
data).
For example, if you specify a page size of 15 records and a number of pages to
prefetch of 3, Flash Remoting automatically fetches 45 records when you make
your first request for a record in the data set. If you then request a record on the
second page that was returned, Flash Remoting prefetches an additional 15
records.
fetchall As a background activity, the RecordSet object fetches the entire contents of the
record set from the server, starting when the service function that retrieves the
record set on the application server returns.
You can specify a page size when you set the delivery mode to
fetchall. Flash
Remoting continues requesting one page at a time from the server until all pages
have been returned. The default page size is 25 records.