Thursday, November 24, 2005

Editing Flash MX files that use Flash remoting MX, in flash 8

Flash Remoting MX was introduced during the Flash MX days (targeting FP 6). Later when Flash MX 2004 was launched, Macromedia came up with a upgraded version of Flash Remoting as well (Flash Remoting for AS 2.0). This version had the remoting classes ported to AS 2.0, and the installer installed the AS classes, Remoting component, and remoting related panels in the appropriate locations according to AS 2.0.

Now with Flash 8, Macromedia has released a new installer for using Flash Remoting with Flash 8. This installer will install the Flash remoting components, AS classes and panels in the appropriate locations with respect to Flash 8 installation. This installer will cater editing the .fla files created using Flash MX 2004 as well. But with .fla files created with Flash MX, we don’t have this luxury. If you open a Fla file that has AS 1.0 code written to use Flash remoting MX, Flash 8 will not be able to compile these .fla files. Because, Flash 8 will not be able to resolve the location of the AS files that are included in the code. (The usual missing files are DataGlue.as”, “NetDebug.as” and “NetServices.as”).

Here is what you can do to make these files work:

If you have Flash MX 2004 installed in your machine, and you had Flash remoting MX installed over it, you will be able to reach the Program Files\Macromedia\Flash MX 2004\en\Configuration\Include folder. This folder is where the remoting installer installs all the AS files that are included to implement remoting. The following files should be available in this folder:

  • DataGlue.as
  • NetDebug.as
  • NetDebugConfig.as
  • NetDebugEvents.as
  • NetDebugHelpers.as
  • NetDebugImpl.as
  • NetDebugLocalConnection.as
  • NetDebugNetConnection.as
  • NetServices.as
  • RecordSet.as
  • RsDataProviderClass.as

Copy all the AS files form this location, to the same folder as your .fla file which uses Flash remoting MX. Compile the .fla file, and it should work now!

And if you want the remoting related panels (netconnection debugger and the Service Browser) as well, copy the NetConnection Debugger.swf and Service Browser.swf from Program Files\Macromedia\Flash MX 2004\en\First Run\WindowSWF folder and add them to Program Files\Macromedia\Flash 8\en\First Run\WindowSWF folder.

2 comments:

Anonymous said...

This ones a nice piece of information. Thanks Arul!!!

Unknown said...

I have just installed the Flash Remoting app for my old mx 2004 version. The include files ... well the where NOT included.
I am a bit stuck here. can someone please email them to my email at gtryan@optusnet.com.au
For now i will just continue reading the Flash Remoting definitive guide and have to use my imagination instead of the .as files