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

163
APPENDIX A
Using NetServices and Connection Classes
This appendix explains how to use the NetServices object to create a gateway connection and
return a Connection object. It also explains how to handle results and error information that are
returned by a service. This appendix covers the following topics:
• “Creating a gateway connection using the NetServices object” on page 163
• “Handling results for a Connection object” on page 167
• “Handling errors for a Connection object” on page 169
Creating a gateway connection using the NetServices object
Note: Although using NetServices to create a Connection object is still supported, in Macromedia
Flash MX 2004, Macromedia recommends that you create a gateway connection using the Service
object. For more information, see the Service class in Flash Remoting ActionScript Dictionary Help.
To create a Flash Remoting Connection object, you first specify the gateway URL and then create
a Connection object that uses it. You have several options for accomplishing these operations,
including the following:
• You can use the NetServices.createGatewayConnection() method to specify the URL and
create the Connection object.
• You can use a NetServices.setDefaultGatewayUrl() method to specify a default gateway,
and use the
NetServices.createGatewayConnection() method without a URL to create
the Connection object. Flash Remoting uses the default gateway for all connections that you
create without otherwise specifying a gateway.
• You can specify the gateway in the web page you use to deploy the Flash SWF file, and use the
NetServices.createGatewayConnection() method without a URL to create the
Connection object.