Flash Remoting TechNote

Flash Remoting checklist for JRun 4 users

When setting up or troubleshooting a project that uses Flash Remoting with JRun, be sure to double-check that you have performed the tasks outlined in this TechNote.

Verify ALL necessary items are successfully installed for both server-side and client-side functionality

Note: Client-side refers to the software needed when developing your project. If you are not authoring the project, the client-side installations are not required.

Flash Remoting Development Requirements

  • Macromedia JRun 4 must be installed and running—including the Flash Remoting gateway.

    Installing JRun provides instructions on the installation process for JRun 4.0.
  • Macromedia Flash MX must be installed if you are going to develop the user interface (UI). Flash MX provides the authoring environment needed to build the front-end of the application.

    Visit the Macromedia Flash Support Center Installation page if you are encountering installation issues.
  • Macromedia Flash Remoting Components must be installed if you are going to develop the code for the application. Components are a set of client-side ActionScript code snippets which allow Macromedia Flash MX to interact with the server-side gateway.

    To install the components, you must first install Macromedia Flash MX on the system. Verify that Macromedia Flash MX was successfully installed BEFORE attempting to install the Flash Remoting Components.

    Note: When you run the setup file "FlashRemotingCmpntsInstall.exe", the installer doesn't prompt you for a serial number. It simply installs the components—which may then be used within Macromedia Flash MX.

Follow these steps to verify that the installations listed above were successful:

  • Macromedia JRun 4.0 (server) must be running. The easiest way to test this is to make a request to the gateway:


    Replace the {JRunPort} in the path above with the actual port of your JRun instance that you want to test.

    If the page is blank, then the gateway is running and working properly. If you receive an error, then ask yourself the following questions:
    • Is the server and/or services running?
    • Are you connecting to the correct server/instance? Double-check the port number.
    • Does the flashgateway.ear file exist in the {Server.RootDir}\lib folder?
    • Do you see the following line display in the command window when starting the server, (or in the {ServerName}-out.log?):

      05/19 18:23:46 info Deploying web application "Flash Remoting" from: file:/D:/dev/JRun4/lib/flashgateway.ear

      Note: The {ServerName}-out.log file only exists on Windows, AND only appears if it is activated in the registry.
    • If the request doesn't work on a server you created, then test the Samples server.
  • Macromedia Flash MX (client) is used to develop a Flash user interface (UI).

    To check if Macromedia Flash MX is successfully installed, choose:

    Start > Programs > Macromedia > Macromedia Flash MX

    Note: Macromedia Flash MX is only required if you are developing Flash UI's. If you are only deploying existing Flash applications (SWF files), you do not need to install the authoring software.
  • Macromedia Flash Remoting Components (client)is used to develop Flash UI's that connect to the Flash Remoting Gateway. The components include pre-written ActionScripts and a NetConnection Debugger utility. The ActionScript items include:
    • Used to connect to the Flash Remoting gateway
    • Used to enable debugging, without it NetConnection Debugger will not work
    • Used to format data
    • Used to return a recordset
    Note: Flash Remoting Components are ONLY needed for developing Flash UI's with Macromedia Flash MX.

    How to verify Flash Remoting Components are installed

    Choose from either of the following two methods listed below:
    • Navigate through your system to locate the:

      {Flash MX install}\Configuration\Include folder.

      If the "Include" folder exists, then the Macromedia Flash Remoting Components are installed.

    • Launch Macromedia Flash MX. Select Window in the Menu bar, (or press ALT+W).

      If you see "NetConnection Debugger" listed in the Window menu, then the Macromedia Flash Remoting Components have been successfully installed.

Using the NetConnection Debugger (within Macromedia Flash MX)

Method one

  1. Select Window > NetConnection Debugger, (or press ALT+W).
  2. Run the movie by selecting File > Publish Preview > Flash.
  3. After the movie runs, select Window > MyMovie.fla. This will bring the NetConnection Debugger in focus.

    Note: When using this method, you need to close the MyMovie.swf file each time. Otherwise, the movie will not update the NetConnection Debugger.

Method two

  1. Select Window > NetConnection Debugger, (or press ALT+W).
  2. Run the movie by pressing CTRL + ENTER.
  3. While the movie runs, the NetConnection Debugger will show the progress of the Flash Remoting calls.

    Note: You do not need to close the MyMovie.swf file each time when using this method.

Troubleshooting issues

Investigate the following only AFTER confirming that everything is installed correctly.

Is the NetConnection Debugger (within Macromedia Flash MX) not working?

  1. Make sure that you include the class in the ActionScript in Macromedia Flash:

    #include ""
  2. If you use method one (listed above) to access the NetConnection Debugger, make sure to close the SWF file each time you want to use NetConnection Debugger, then run the movie Publish Preview again.

Is the Flash movie (within Macromedia Flash MX) not connecting?

  1. It is recommended that you include the class in the first frame of the movie, and the connection to the gateway in the same frame. If you have chosen not to put them in the first frame, then make sure they are defined before you use the connection in your movie.

    To check this, do the following:
    1. Select Window > Actions (or press F9).
    2. From the pop-up menu, select "Actions for frame 1 of Layer Name Layer 1".

      "Layer 1" will be the name of your layer.
    3. Make sure that the code connecting your movie to Flash Remoting is in this frame, (or defined before using it).
  2. Make sure to include the class file, again in the first frame:

    #include ""
  3. The actual connection ActionScript should look like the following:
    #include ""
    #include ""
    #include ""
      if (inited != true) {
        inited = true;
        gatewayConnection = NetServices.createGatewayConnection();
        MyService = gatewayConnection.getService("package.JavaBean", this);

Error messages that may occur in the NetConnection Debugger when using Flash Remoting:

Error "NetConnection.Call.Failed"
Problem The server is not running or the URL to the gateway is not correct. No connection can be established to the gateway.
Solution Ensure the server is running and you are pointing to the correct port (instance) in your gateway URL.


Error "Service threw an exception during method invocation: No service named demo.DealerGateway is known to Flash Remoting."
Problem The movie could not create the Service Object because it doesn't exist. You either misspelled it, have the path incorrect, the object name incorrect, or you are trying to connect to a unsupported service.
Solution Ensure the service and/or object name and paths are correct.

Additional online resources

Last updated: June 24, 2002
Created: May 24, 2002
ID: 16358
Product: Flash Remoting
Versions: All
OS: All
Browser: All
Server: All
Database: All
Former ID: N/A