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

29
CHAPTER 2
Using Flash Remoting ActionScript
This chapter explains how to write ActionScript 2.0 code that uses Macromedia Flash Remoting
for Flash MX 2004 to access application services. It explains how to configure connection
information, call service functions, and handle the results that the service returns. After reading
this chapter, you should be able to create a simple application that uses Flash Remoting to obtain
data from an application server.
This chapter describes two ways to access a remote service. The first and easiest way is to use the
RemotingConnector component. The second way is to use the methods of the Flash Remoting
API. The chapter leaves the discussion of the RemotingConnector component to the end because
whether you use it or the API, you need to understand the structure of a Flash Remoting
application and how to handle the results that the service returns.
The chapter also contains two extended examples, CustomerInfoExampleAPI and
CustomerInfoExampleCon, that are different versions of the same application. The
CustomerInfoExampleAPI example uses the Flash Remoting API to connect to and access a
service. The CustomerInfoExampleCon example uses the RemotingConnector component to
connect to and access the same service. For descriptions of these examples, see “Using the Flash
Remoting ActionScript API in the CustomerInfoExampleAPI application” on page 47 and
“Using the RemotingConnector in the CustomerInfoExampleCon application” on page 57.
This chapter contains the following sections:
• “Flash Remoting application structure” on page 30
• “Flash Remoting ActionScript classes” on page 32
• “Configuring Flash Remoting” on page 36
• “Calling service functions” on page 41
• “Handling service results and errors” on page 43
• “Using the Flash Remoting ActionScript API in the CustomerInfoExampleAPI application”
on page 47
• Chapter 3, “Using the RemotingConnector component (Flash Professional only),” on page 53
• “Using the RemotingConnector in the CustomerInfoExampleCon application” on page 57