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

Calling ASP.NET pages from Flash 149
Using the Flash Remoting custom server control in ASPX pages
To access data passed from Flash applications or return results to Flash applications in ASPX
pages, you use the Flash Remoting custom server control in your ASPX page. The Flash
Remoting server control is provided by the flashgateway DLL, which is located in the local
assembly cache (bin directory) of your application. You must first register this control, as you
would any custom server control, in your ASPX page. Here is an example:
<%@ Register TagPrefix="Macromedia" Namespace="FlashGateway"
Assembly="flashgateway" %>
The Register directive establishes the tag prefix (Macromedia), namespace (FlashGateway), and
the assembly that provides the functionality (
flashgateway). After you register the custom server
control in your ASPX page, you can use it to pass data to Flash applications, as the following
example shows:
<Macromedia:Flash ID="Flash" runat="server">
Hello from .NET!
</Macromedia:Flash>
When the Flash application invokes the custom server control, the string Hello from .NET! is
returned.
In addition to passing simple strings, you can write code in a .NET-supported language that
accesses parameters passed from Flash and returns processed results to Flash. The Flash Remoting
custom server control contains two properties for accessing passed parameters and returning
results:
Flash.Params and Flash.Result.
The
Flash.Params property is a list consisting of parameters passed from a Flash application.
The parameters arrive in the order that they were passed from the service function call in the
ActionScript code of a Flash application. The
Flash.Result property returns its value to Flash.
You can access Flash parameters like any other value in .NET, as the following C# example shows:
<%@ Page Language="C#" debug="true" %>
<%@ Register TagPrefix="Macromedia" Namespace="FlashGateway"
Assembly="flashgateway" %>
<Macromedia:Flash ID="Flash" Runat="Server" />
<%
String message = "Hi ";
if (Flash.Params.Count > 0)
{
message += Flash.Params[0].ToString();
}
Flash.Result = message;
%>
Between the rendering blocks (<%...%>), the if statement condition, Flash.Params.Count >
0
, evaluates the Flash.Params list for the number of parameters present. If a parameter is
present, the parameter value, as a string, is appended to the
message variable. Finally, the
message variable is assigned into the Flash.Result property, which is returned to Flash.