Accessibility

Macromedia Flash Remoting Release Notes

This document contains the latest information on Flash Remoting Components.

To read about Flash Remoting documentation updates, click here.

For more information, see the following known issues sections:

Flash Remoting Components Known Issues

When you install the Flash Remoting Components on Windows, do not select the Custom option in the Setup Type dialog box. (#N-38924)

When the first one or two frames of a movie contain ActionScript that calls a service function, checkbox settings in the Filter area of the NCD do not take effect until the movie is run a second time. (#C-26993)

There might be a lag of one to two seconds before events appear in the NetConnection Debugger when scrolling using the vertical scroll bar. To improve performance, you can select the 100 events in memory option in the NetConnection Debugger Preferences menu. (#C-27748)

Flash MX Authoring test player and Flash 6 Player could fail when there are 10 simultaneous connections from a movie to one URL. The Flash MX Authoring Output window displays "Error opening URL" and Flash Player provides no indication of failure. (#C-20505)

Netscape Navigator 6.* does not support Flash Remoting. (#N-38492)

At end of Flash Remoting Components installation on Windows Me and 98, the Flash Remoting readme file doesn't open. To view the readme file, select the Start menu > Programs > Macromedia > ReadMe Files > Flash Remoting Components. (#N-45503)

The prototype sortItemsBy() in RsDataProviderClass.as does not send all required parameters to the .updateViews() method. Change the following line of code in this prototype:

this.updateViews( {event:"sort" } ); 

to

this.updateViews( {event:"sort", fieldName:fieldName, order:order} );
 

(#N-45713)

Flash Remoting service for JRun 4 Known Issues

Public and private attributes of Java objects implementing Serializable are returned to a Flash movie. (#N-38379)

Do not serialize a Java ResultSet from JDBC code directly back to Flash. ResultSets are live, connected objects associated with pooled resources and I/O socket resources such as Statements and Connections. When a Statement or Connection is closed in JDBC code, all ResultSets associated with them are also automatically closed. Even if a user decides not to close a Statement or Connection, they could be closed and reclaimed by the application server at any time because they are pooled resources. If the ResultSet was closed for any reason, it will not be available to Flash Remoting for serialization. (#N-36858)

To use Java classes and JavaBeans as Flash Remoting services, the Java objects must have default no-args constructors. (#N-37815)

Flash Remoting service for ColdFusion MX

When identical ColdFusion components are present under the IIS web root (C:\Inetpub\wwwroot) and the ColdFusion web root (C:\CFusionMX\wwwroot), the Flash Remoting service uses the components in the ColdFusion web root even when using IIS. (#N-36235)

You should not pass Boolean objects from ColdFusion to a Flash movie. ActionScript's automatic type conversion casts the strings "true", "false", "yes", and "no" to zero because they contain no numeric information. Instead, send the number 1 to indicate true, and the number 0 to indicate false. (#N-33058)

A "ColdFusion debugging is not enabled on the server" message appears in the NCD when ColdFusion pages encounter a syntax error. The message appears even when ColdFusion debugging is enabled in the ColdFusion Administrator.

Flash Remoting Documentation Updates

Using Flash Remoting Components > Calling service functions, passing parameters, and handling results > Create a new result object for every service function call

#include "NetServices.as"

Using Flash Remoting Components > Service Browser

You can only use the Service Browser, installed with the Flash Remoting Components, with ColdFusion components (*.cfc). ColdFusion pages do not work with the Service Browser.

Using Flash Remoting Components > Connecting to Flash Remoting

For WebSphere, the Flash Remoting service URL, [host:port]/flashservices/gateway, represents a virtual directory and does not exist as a physical directory in your web root. You do not need to specify the directory structure that contains your application files in the URL. Rather, you specify the directory structure in the getService function. For .NET, you must use the URL [host]/flashservices/gateway.aspx, which directly maps to a blank gateway.aspx file in the installation webroot. You should not modify the gateway.aspx file in any way.

Using the Flash Remoting service with ColdFusion MX > Using the Flash Remoting service with ColdFusion Java objects

This section is incorrect. You cannot call Java objects directly in ColdFusion. You must use the cfobject tag or createObject function in a ColdFusion page or component.

Using the Flash Remoting service with ColdFusion MX > Authenticating Flash movies to ColdFusion

You can use the setCredentials ActionScript function to authenticate service functions to ColdFusion. You must use the setCredentials functions in the connection code, as the following example shows:

NetServices.setDefaultGatewayUrl("http://localhost:8500/flashservices/gateway");
gateway_conn = NetServices.createGatewayConnection();
gateway_conn.setCredentials("bob","password");
myService = gateway_conn.getService("securityTest.thecfc", this);

In your ColdFusion pages or components, you access the username and password passed from Flash using the CFLOGIN variable scope. For example, you could use an application.cfm file in your ColdFusion applications to establish a security role, as the following example shows:

<cflogin>
   <cfif IsDefined("CFLOGIN")>
      <cfloginuser name=" #CFLOGIN.name# " password=" #CFLOGIN.password#" roles="Admin">
   </cfif>
</cflogin> 

Introduction to Flash Remoting with ColdFusion MX Tutorial > Creating the Flash movie > To create the Flash Movie

Modified Step: In the ActionScript, the searchButton_Clicked function should appear like the following example:

   function searchButton_Clicked ()
{
	myService.getEmployees(lnameText.text, fnameText.text, departmentData.getSelectedItem().data);
} 

Additional Step: In the searchButton component's Properties panel, enter searchButton_Clicked for the Click Handler.

For the combobox component to be populated when the movie first loads, move the myService.getDepartments() function below the Flash Remoting connection code.

For the Flash movie search functionality to work as expected, the empObj component method's SQL statement should appear like the following example:

<cfoutput>
   <cfquery name="empQuery" datasource="exampleapps">
   	SELECT tblEmployees.EmployeeID, tblEmployees.DeptIDFK, tblEmployees.FirstName, 
			tblEmployees.LastName, tblDepartments.DepartmentName
   	FROM tblEmployees, tblDepartments 
   	WHERE tblEmployees.DeptIDFK = tblDepartments.DepartmentID 
   <cfif isDefined("arguments.fnameText")>
   	and tblEmployees.firstName LIKE '#arguments.fnameText#'
   </cfif> 
   <cfif isDefined("arguments.lnameText")>
   	and tblEmployees.lastName LIKE '#arguments.lnameText#'
   </cfif>
   <cfif isDefined("arguments.departmentData")>
   	and tblDepartments.DeptIDFK LIKE '#arguments.departmentData#'
	</cfif>
   ORDER BY tblEmployees.LastName, tblEmployees.FirstName 
   </cfquery>
</cfoutput>

Using Flash Remoting with J2EE application servers > Using Flash Remoting with J2EE application servers overview

For Java services, you must define a default constructor if you define additional constructors. When there are no constructors, the object class's constructor is used.

Using Flash Remoting with J2EE application servers > Using Flash Remoting with J2EE application servers overview

When the Flash Remoting service receives a call from a Flash movie, it looks for the matching Java service in the following order:

  1. JavaBean (stateful)
  2. Java Class (no state and no pool, new instance on every request)
  3. EJB (EJBHome and EJBObject)

Using the Flash Remoting service with JRun 4 > Saving your Java application files for Flash Remoting

For standard Java classes, including JavaBeans, you put the classes under jrun_root/servers/jrun_server/SERVER-INF. Loose classes go in a classes subdirectory and jarred classes go in a lib subdirectory; the classes are available server-wide. By default, Remoting doesn't have access to classes in a web application, but you can put the Flash Remoting JAR file in a web application and add a servlet mapping to the web application's web.xml file. You can also place Java classes in the jrun_root/lib directory if you want them to be available to the entire JRun installation. Note also that when you do put classes under a WEB-INF directory, loose classes go in WEB-INF/classes and jarred classes go in WEB-INF/lib.

Flash Remoting ActionScript Reference > NetConnection (object) > Usage

gatewayConnection.setCredentials(username, password)