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

18 Chapter 1: Getting Started
Connecting to a service
The fundamental step in using Flash Remoting in your Flash application is connecting to a
remote service. In Flash Remoting for Flash MX 2004 ActionScript 2.0, you can connect to a
remote service either by using the RemotingConnector component or by using the Flash
Remoting ActionScript API to write code in the Actions panel.
To connect to a service using the RemotingConnector component (Flash Professional):
If you use Flash Professional, you perform these basic steps to use the RemotingConnector to
connect to a service.
1.
In the Components panel, select RemotingConnector from the Data Components section and
drag it onto the Stage.
2.
Set parameters in the Component inspector.
3.
Set bindings in the Component inspector.
4.
Write code in the Actions panel.
For more detailed information about connecting to a service by using the RemotingConnector
component, see Chapter 3, “Using the RemotingConnector component (Flash Professional
only),” on page 53. You should read the following sections, however, even if you plan to use the
RemotingConnector to connect to your remote services.
To connect to a service by writing ActionScript code:
1.
From the Window menu in Flash, select Other Panels > Common Libraries > Remoting.
2.
From the Library panel, drag the RemotingClasses library onto the Stage.
3.
To use the NetDebug class and the NetConnection Debugger, you must also drag the
RemotingDebugClasses library to the Stage.
4.
Write your code in the Actions panel.
For more information on writing ActionScript code for Flash Remoting, see the following
sections on building a Hello World application and Chapter 2, “Using Flash Remoting
ActionScript,” on page 29.
For more information on adding the RemotingDebugClasses library to your application, and on
removing it, see “Using the NetConnection Debugger” on page 87.
Building a Hello World application with Flash Remoting
In this section, you build a simple Flash application that uses the Flash Remoting ActionScript
API to connect to a remote service. You can choose among four different remote services,
including a ColdFusion page, a JavaBean, an ASPX page, and a web service. Flash applications
require minimal changes to call different remote services.
The following sections show you first how to build the remote service and then how to call the
remote service from your Flash application using Flash Remoting ActionScript.