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

64 Chapter 4: Using Flash Remoting Data in ActionScript
The following figure shows this data conversion:
A two-step conversion process enables Flash Remoting to use a system-neutral, efficient
representation for the data it transmits. This way, you can create a Flash application that can work
with multiple application servers.
Flash Remoting performs all data conversions automatically. In most cases, the conversion is
straightforward; you simply pass the ActionScript data as arguments to a remote service, and
process or display the returned data in your callback functions. In a few cases, you must
understand data type conversion considerations to ensure correct application behavior. This
chapter includes information about these considerations.
Understanding Action Message Format
To send and receive messages from remote services, Flash Remoting uses Action Message Format
(AMF), a binary message format designed for the ActionScript object model. Using AMF, Flash
Remoting encodes data types back and forth between the Flash application and the remote service
over HTTP. Modeled on the Simple Object Access Protocol (SOAP), AMF uses a packet format
to relay information. An AMF packet consists of the following parts:
• Packet header that contains AMF version information
• Context header count
• Array of context headers that contain information describing the context in which individual
AMF messages should be processed
• Message count
• Array of messages
Server function requests are automatically serialized into AMF format. On the server, Flash
Remoting deserializes the incoming AMF messages. When the server-side processing finishes, the
results are serialized to AMF and sent back to the Flash application. The format of the
server-generated AMF message is identical to the client-generated packet. The body of the
individual AMF message contains the error or response object, which is expressed as an
ActionScript object. For more information about error and response objects, see Chapter 2,
“Using Flash Remoting ActionScript,” on page 29.