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

76 Chapter 4: Using Flash Remoting Data in ActionScript
For more information about each of these methods, see Flash Remoting ActionScript Dictionary
Help. The following sections describe how you can use these methods to create and manage
RecordSet objects in ActionScript code.
Using RecordSet methods and properties
The following sections describe how to use
RecordSet methods to manage RecordSet objects.
Creating RecordSet objects
Most RecordSet objects are returned by service functions, so you do not typically have to create
them. However, you can use the RecordSet object constructor to create a record set directly in
ActionScript. For example, the following line creates a new RecordSet object with two columns:
DepartmentID and DepartmentName. This RecordSet object does not contain any data:
myRecordSet = new RecordSet(["DepartmentID", "DepartmentName"]);
Getting values and information from RecordSet objects
The following sections describe how to get record set values and information.
Getting record set data values
To get a specific record in the RecordSet object, specify the record’s 0-based index in the
getItemAt() method. For example, the following line gets the third record in a record set:
myRecord = myRecordSet.getItemAt(2);
To get the value of a specific field in a record, use the column name as a property of the record.
For example, use the following line to get the value of the DepartmentName field of the fourth
record in the RecordSet object named myRecordSet:
myDept = myRecordSet.getItemAt(3).DepartmentName;
Note: Because the RecordSet object implements all of the ActionScript DataProvider methods, you
can also use RecordSet objects directly with any object that takes a DataProvider, such as the Flash
UI ComboBox Component. For more information on using RecordSet objects with Flash UI
components, see “Using Flash UI components with RecordSet objects” on page 83.
RecordSet.setDeliveryMode()
Changes the delivery mode of a pageable record set from an
application server.
RecordSet.setField()
Replaces one field of a record with a new value.
RecordSet.sort()
Sorts all the records using a comparison function that you
specify as an argument to the method.
RecordSet.sortItems()
Sorts all the records using a user-specified comparison
function
RecordSet.sortItemsBy()
Sorts all records in the RecordSet object in ascending or
descending order, according to the current locale’s sorting
order.
Method Description