22
Chapter 1: Getting Started
Migrating existing applications to Flash Remoting for Flash MX
2004 ActionScript 2.0
If you are a new Flash Remoting user who has not yet written any Flash Remoting applications,
you can skip this section.
If you have written Flash Remoting applications using ActionScript 1.0 and you want to migrate
to Flash Remoting for Flash MX 2004 ActionScript 2.0, you have two choices regarding how to
migrate your applications. First, you can make the minimum changes possible to allow your
applications to run with ActionScript 2.0. Second, you can rewrite your application to take
advantage of the improvements in ActionScript 2.0. The following sections describe the tasks that
each choice entails.
Making the minimum changes to your application for ActionScript 2.0
This section describes the minimum changes that you must make to migrate an existing Flash
Remoting application to Flash Remoting for Flash MX 2004 ActionScript 2.0.
To make the minimum changes to your application for ActionScript 2.0:
1.
Drag the RemotingClasses library to the Stage as described in the section
“Connecting to a
service” on page 18
. If you use the NetDebug class in your program, you must also drag the
RemotingDebugClasses library to the Stage. You can delete the icons from the Stage, if you
want. They do not appear in the published application, however.
2.
Replace any Flash MX UI components with Flash MX 2004 UI components. Because
ActionScript 2.0 is case sensitive, most of the components have been modified for
case-sensitivity and logic issues.
3.
Change
#include
statements to the appropriate
import
statements. For example, if your
application contains the following statements:
#include “NetServices.as”
//…
var con:Connection = NetServices.createGatewayConnection(…);
you must change them to the following:
import mx.remoting.NetServices;
//…
var con:Connection = NetServices.createGatewayConnection(…);
To determine what
import
statements you need, see
“Importing Flash Remoting ActionScript
classes” on page 35
.
4.
If you use the NetDebug class in your program, you must include the following statement in
your application before connecting to a service:
mx.remoting.debug.NetDebug.initialize()
Содержание FLASH REMOTING MX-USING FLASH REMOTING FOR FLASH MX 2004 ACTIONSCRIPT...
Страница 1: ...Using Flash Remoting for Flash MX 2004 ActionScript 2 0...
Страница 8: ...8 Contents...
Страница 62: ...62 Chapter 3 Using the RemotingConnector component Flash Professional only...
Страница 142: ...142 Chapter 7 Using Flash Remoting for Java...