Accessibility
Adobe
Sign in Privacy My Adobe

Flex Documentation

Installing Flex

This document contains installation instructions for the Macromedia Flex 1.0 release. For more information, see the following sections:

Installing the Flex 1.0 Updater 2

After installing Flex 1.0, you should install Flex 1.0 Updater 2 . Updater 2 contains all of the updates included in Updater 1, plus additional updates. Before you install Updater 2, you must have already installed Flex 1.0 or Flex 1.0 with Updater 1.

Installation Overview

Flex is a J2EE web application that you can install as a Web Application Archive (WAR) file onto any supported Java Application Server. Flex includes the following WAR files:

  • flex.war — The primary Flex WAR file.
  • samples.war — Example Flex applications.
  • profiler.war — Debugging application for use with Flex.

Each WAR file is a separate, stand-alone application. Do not install the samples.war file or profiler.war file in the same application directory as the flex.war file. Instead, install them as separate applications on your server with their own directory structures and contexts.

If you install the Trial Edition of Flex, then you have the option of installing Flex onto an integrated Java Application Server (JRun 4.0). Select this option in the installer if you do not already have a Java Application Server installed. If you do have a Java Application Server running, then you can install the Flex WAR file on top of it.

If you install the full version of Flex, then you must have a Java Application Server already installed. You then deploy the Flex WAR file to your server and start building Flex applications.

For more information on Flex server requirements and versions, see the following sections:

Flex Requirements

Flex requires the following:

  • System
    • Intel Pentium processor or SPARC
    • 256 MB RAM (512 MB recommended)
    • 400 MB hard drive space
    • Macromedia Flash Player 7.0.14 or later
  • One of the following application servers
    • Macromedia JRun 4 Updater 2
    • IBM WebSphere 5
    • BEA WebLogic Server 7 and 8.1
    • Tomcat 4.1.29 and later
  • One of the following OS
    • Microsoft Windows 2000 Server
    • Microsoft Windows 2003 Server
    • Microsoft Windows 2003 Standard Server
    • Microsoft Windows XP Professional
    • Red Hat Enterprise AS 2.1 and 3.0
    • Sun Solaris 8
    • Sun Solaris 9
  • One of the following Java versions
    • Sun 1.3.x
    • Sun 1.4.x
    • IBM 1.3 for use with WebSphere
    • IBM 1.4 for use with WebSphere
    • BEA JRockit 1.4 for use with Weblogic

Note: Double-byte operating systems require a double-byte version of the Java Runtime Environment (JRE).

Flex Versions

The following versions of Flex are available:

  • Flex 1.0
    • License key required.
    • Responds to requests from an unlimited number of IP addresses.
    • Precompiled SWF files do not time out.
    • No option for installing an integrated Java Application Server.
  • Flex 1.0 Trial Edition
    • No license key required.
    • Responds to requests from an unlimited number of IP addresses.
    • Precompiled SWF files time out after 24 hours and must be recompiled. If clients request the *.mxml file from the server, there is no timeout.
    • Full functionality for 60 days. After 60 days, the Trial Edition provides Flex 1.0 Developer Edition functionality. To extend the Trial Edition another 60 days, contact Macromedia Customer Service.
    • Optional integrated JRun 4 Java Application Server.
  • Flex 1.0 Developer Edition
    • No license key required.
    • Responds to requests from up to five IP addresses, plus the localhost.
    • Precompiled SWF files time out after 24 hours and must be recompiled. If clients request the *.mxml file from the server, there is no timeout.
    • Optional integrated JRun 4 Java Application Server.

There is no separate option for installing the Flex 1.0 Developer Edition. When installed without a license key, Flex defaults to a Trial Edition for the first 60 days. When the 60 days is over, Flex changes to the Developer Edition.

If the trial period ends while the Trial Edition is running, you must restart your application server before Flex runs in Developer Edition mode. Otherwise, Flex returns a NullPointerException.

Installing Flex on Windows

This section contains two installation procedures: one for systems that have a Java Application Server already installed, and one for systems that do not. The second procedure, for Flex Trial Edition installation only, includes a JRE and JRun 4 server for use with Flex.

To install Flex on a system with an existing Java Application Server:

  1. (Optional) Create a new server on your Java application server.
  2. Create a directory named flex to act as the context root for the Flex application on your Java application server. For example, if you are using JRun, create the following directory:
    jrun_root/servers/server_name/flex
    
  3. (Optional) Create a directory named samples to act as the context root for the Flex sample applications on your Java application server. For example, if you are using JRun, create the following directory:
    jrun_root/servers/server_name/samples
    
  4. Download flex-10-win.exe.
  5. Double-click the flex-10-win.exe file.
  6. Follow the onscreen instructions to install Flex. In the "Choose Install Type" window, select the "Macromedia Flex" installation option. This window only appears if you entered an invalid serial number or no serial number.
    The installer writes the following files to the default installation folder, C:/Program Files/Macromedia/Flex:
    /flex.war
    /profiler.war
    /samples.war
    
    /dochome.htm
    /license.htm
    /Macromedia_Flex_1.0_InstallLog.log
    /readme.htm
    
    /bin/..
    /extras/..
    /flexforflash/..
    /lib/..
    /UninstallerData/..
    
  7. When the installer finishes, find the flex.war file at the top level of the default installation folder.
  8. Use WinZip, jar, or another archiving utility to extract the contents of the flex.war file to the /flex directory that you created in step 3; for example, from the /flex directory, type the following command:
    jar -xvf "C:/Program Files/Macromedia/Flex/flex.war"
    
  9. Use WinZip, jar, or another archiving utility to extract the contents of the samples.war file to the /samples directory that you created in step 4; for example, from the /samples directory, type the following command:
    jar -xvf "C:/Program Files/Macromedia/Flex/samples.war"
    
  10. Start or restart your application server. For more information, see your web application server's documentation.
  11. To configure Flash Player debugging or profiling for Flex, copy the /Flex/bin/mm.cfg file to the client computer's home directory. To determine the location of your home directory on a Windows computer, use the following command at the command prompt:
    echo %HOMEDRIVE%%HOMEPATH%
    
    There are additional steps to using the Profiler. For more information, see Developing Macromedia Flex Applications.
    For additional information on identifying your home directory, see Configuring Flex.
  12. Go to the Flex documentation page and download the latest documentation.
  13. Install Flash Player 7. For more information, see Installing Flash Player.
  14. Verify the installation. For more information, see Verifying the Flex Installation.

To install Flex on a Windows system with no pre-existing Java Application Server (Trial Edition only):

  1. Download flex-10-win.exe.
  2. Double-click the flex-10-win.exe file.
  3. Follow the onscreen instructions to install Flex. In the "Choose Install Type" window, select the "Integrated JRun4/Macromedia Flex" installation option. This window only appears if you entered an invalid serial number or no serial number.
    The installer writes the following files to the default installation folder, C:/Program Files/Macromedia/Flex:
    /dochome.htm
    /license.htm
    /Macromedia_Flex_1.0_InstallLog.log
    /readme.htm
    
    /bin/...
    /extras/..
    /flexforflash/..
    /jrun4/bin/..
    /jrun4/lib/..
    /jrun4/servers/default/flex/..  (exploded flex.war application)
    /jrun4/servers/default/profiler/..  (exploded profiler.war application)
    /jrun4/servers/default/samples/..  (exploded samples.war application)
    /lib/..
    /UninstallerData/..
    
  4. The directory /Flex/jrun4 contains the JRun 4 Application Server and a deployed version of Flex.

  5. When the installer finishes, start the JRun 4 server. To start JRun, you can leave the Start Server checkbox enabled in the installer or see Starting and stopping JRun.
  6. To configure Flash Player debugging or profiling for Flex, edit the home_directory/mm.cfg file. The installer copied that file to your home directory during installation. On Microsoft Windows 2000 and Windows XP, the default home directory is C:/Documents and Settings/user_name where user_name is your system user name.
    There are additional steps to using the Profiler. For more information, see Developing Flex Applications.
    For information on identifying your home directory, see Configuring Flex.
  7. Go to the Flex documentation page and download the latest documentation.
  8. Install Flash Player 7. For more information, see Installing Flash Player.
  9. Verify the installation. For more information, see Verifying the Flex Installation.

Starting and stopping JRun 4

This section describes how to start and stop the integrated JRun Java Application Server.

To start the integrated JRun 4 server:

  1. Select Start > Programs > Macromedia > Flex > Start Integrated Flex Server.
or
  1. Open a Command Prompt window.
  2. Change directories to the /Flex/jrun4/bin directory.
  3. Type the following command:
    jrun -start default
    

To stop the JRun server, type the following command:

jrun -stop default

With the integrated JRun server, the Flex applications are accessible using the following URLs:

http://localhost:8700/flex
http://localhost:8700/profiler
http://localhost:8700/samples

For more information on JRun 4, see the JRun 4 documentation.

Installing Flex on Linux/Solaris

This section contains two installation procedures: one for systems that have a Java Application Server already installed, and one for systems that do not. The second procedure, for Trial Edition installations only, installs a JRE and the JRun 4 Java Application Server for use with Flex.

To install Flex on a system with an existing Java Application Server:

  1. (Optional) Create a new server on your Java application server.
  2. Create a directory named flex to act as the context root for the Flex application on your Java application server. For example, on JRun, you create the following directory:
    jrun_root/servers/server_name/flex
    
  3. (Optional) Create a directory named samples to act as the context root for the Flex Sample applications on your Java application server. For example, if you are using JRun, create the following directory:
    jrun_root/servers/server_name/samples
    
  4. Download flex-10-lin.bin (Linux) or flex-10-sol.bin (Solaris) to a temporary directory.
  5. Start the Flex installer using the following command:
  6. ./flex-10-lin.bin
    
    or
    ./flex-10-sol.bin
    
  7. Follow the onscreen instructions to install Flex. In the "Choose Install Type" window, select the "Macromedia Flex" installation option. This window only appears if you entered a Trial serial number, an invalid serial number, or no serial number.
    The installer writes the following files to the default installation folder, /opt/Macromedia/Flex:
    /flex.war
    /profiler.war
    /samples.war
    
    /dochome.htm
    /license.htm
    /Macromedia_Flex_1.0_InstallLog.log
    /readme.htm
    
    /bin/..
    /extras/..
    /flexforflash/..
    /lib/..
    /UninstallerData/..
    
  8. When the installer finishes, find the flex.war file at the top level of the installation folder.
  9. Use jar, or another archiving utility to extract the contents of the flex.war file to the /flex directory that you created in step 2; for example, from the /flex directory, type the following command:
    jar -xvf /opt/Macromedia/Flex/flex.war
    
  10. Use jar, or another archiving utility to extract the contents of the samples.war file to the /samples directory that you created in step 3; for example, from the /samples directory, type the following command:
    jar -xvf /opt/Macromedia/Flex/samples.war
    
  11. Start or restart your application server. For more information, see your web application server's documentation.
  12. To configure Flash Player debugging or profiling for Flex, copy the /Flex/bin/mm.cfg file from your Linux/Solaris computer to the home directory on a Windows client. To determine the location of your home directory on a Windows computer, use the following command at the command prompt:
    echo %HOMEDRIVE%%HOMEPATH%
    
    There are additional steps to using the Profiler. For more information, see Developing Flex Applications.
    For additional information on identifying your home directory, see Configuring Flex.
  13. Go to the Flex documentation page and download the latest documentation.
  14. Install Flash Player 7. For more information, see Installing Flash Player.
  15. Verify the installation. For more information, see Verifying the Flex Installation.

To install Flex on a Linux/Solaris system with no pre-existing Java Application Server (Trial Edition only):

  1. Download flex-10-lin.bin (Linux) or flex-10-sol.bin (Solaris).
  2. Start the Flex installer using the following command:
  3. ./flex-10-lin.bin
    or
    ./flex-10-sol.bin
  4. Follow the onscreen instructions to install Flex. In the "Choose Install Type" window, select the "Integrated JRun 4/Macromedia Flex" installation option. This window only appears if you entered a Trial serial number, an invalid serial number, or no serial number.
    The installer writes the following files to the default installation folder, /opt/Macromedia/Flex:
    /flex.war
    /profiler.war
    /samples.war
    
    /dochome.htm
    /license.htm
    /Macromedia_Flex_1.0_InstallLog.log
    /readme.htm
    
    /bin/...
    /extras/..
    /flexforflash/..
    /jrun4/bin/..
    /jrun4/lib/..
    /jrun4/servers/default/flex/..  (exploded flex.war application)
    /jrun4/servers/default/profiler/..  (exploded profiler.war application)
    /jrun4/servers/default/samples/..  (exploded samples.war application)
    /lib/..
    /UninstallerData/..
    
  5. The directory /Flex/jrun4 contains the JRun 4 Java Application Server and a deployed version of Flex.

  6. When the installer finishes, start the JRun 4 server. To start JRun, see Starting and stopping JRun.
  7. If your Unix system does not have a monitor (it is headless), you must do one of the following, depending on your environment:
    • X-windows with any supported JRE: You must set the DISPLAY environment variable.
    • JRE 1.4.1x: Uncomment the following line in the /jrun4/servers/server_name/application_name/WEB-INF/flex/flex-config.xml file for all applications (flex.war, samples.war, and profiler.war):
      <headless-server>true</headless-server>
      
    • JRE 1.4.2x: This version of the JRE resolves headless issues without any special requirements.
  8. To configure Flash Player debugging or profiling for Flex, copy the /Flex/bin/mm.cfg file from your Linux/Solaris computer to the home directory on a Windows client. To determine the location of your home directory on a Windows computer, use the following command at the command prompt:
    echo %HOMEDRIVE%%HOMEPATH%
    
    There are additional steps to using the Profiler. For more information, see Developing Flex Applications.
    For additional information on identifying your home directory, see Configuring Flex.
  9. Go to the Flex documentation page and download the latest documentation.
  10. Install Flash Player 7. For more information, see Installing Flash Player.
  11. Verify the installation. For more information, see Verifying the Flex Installation.

Starting and stopping JRun 4

This section describes how to start and stop the integrated JRun Java Application Server.

To start the JRun 4 server:

  1. Change directories to the /Flex/jrun4/bin directory.
  2. Type the following command:
    ./jrun -start default
    

To stop the JRun 4 server:

  1. Change directories to the /Flex/jrun4/bin directory.
  2. Type the following command:
    ./jrun -stop default
    

With the integrated JRun server, the Flex applications are accessible using the following URLs:

http://localhost:8700/flex
http://localhost:8700/profiler
http://localhost:8700/samples

For more information on JRun 4, see the JRun 4 documentation.

Installing Flash Player

Flex requires that you run Flash Player 7. Flex supports two versions of the Flash Player: debug and standard. The debug version of the Flash Player displays debugging information during runtime and generates profiling information so that you can more easily develop applications.

NOTE: Before installing a new Flash Player, you should uninstall your existing Flash Player. Flex includes the Flash Player uninstallation utility (uninstall_flash_player.exe) in the /Flex/bin directory.

The following table describes the standard Flash Players. Click a link in this table to go to the Flash Player download site for the download file and instructions:

Standard Player Description
ActiveX Player An ActiveX Flash plug-in for Microsoft Internet Explorer.
NS Player A Flash plug-in for Netscape Navigator.
Mac OS Player A Flash player for Mac OS X.
Stand-alone Player An executable application that lets you run Flash files in a separate window so that they feel more like stand-alone applications. The stand-alone player does not support HTTP authentication or the use of a web proxy which is required for some Flex applications.

The following table describes the Flash Debug Player:

Debug Player Description
ActiveX Debug Player An ActiveX Flash plug-in for Microsoft Internet Explorer includes enhanced error reporting and supports the Flex Debugger and ActionScript Profiler.
Netscape/Mozilla Debug Player A debug player for Netscape Navigator/Mozilla that includes enhanced error reporting and supports the Flex Debugger and ActionScript Profiler.
Stand-alone Debug Player An executable Flash application that lets you run Flash files in a separate window so that they feel more like stand-alone applications. This version includes enhanced error reporting and supports the Flex Debugger and ActionScript Profiler applications. The stand-alone player does not support HTTP authentication or the use of a web proxy which is required for some Flex applications.

To install the ActiveX Flash Debug Player for Microsoft Internet Explorer:

  1. (Linux/Solaris only) Copy Flash Debug Player installation file, "Install Flash Player 7 AX.exe", from the /Flex/bin directory on your Linux/Solaris system to a Windows computer.
  2. To install the ActiveX Flash Debug Player for Internet Explorer, run the following file:
     Install Flash Player 7 AX.exe

To install the Netscape/Mozilla Flash Debug Player:

  1. (Linux/Solaris only) Copy Netscape/Mozilla Debug Player installation file, "Install Flash Player 7.exe", from the /Flex/bin directory on your Linux/Solaris system to a Windows computer running Netscape/Mozilla.
  2. Run the following file:
     Install Flash Player 7.exe

To run the Stand-alone Flash Debug Player:

  1. (Linux/Solaris only) Copy the stand-alone Flash Debug Player, "SAFlashPlayer.exe", from the /Flex/bin directory on your Linux/Solaris system to a Windows computer.
  2. To start the stand-alone Flash Debug Player, use the following command:
    SAFlashPlayer.exe

Verifying the Flex Installation

After you install Flex, you should verify that the application is running properly on your Java Application Server. If you installed the samples.war file or used the integrated installer, you can request the Flex samples applications, as described below.

If you did not install the samples.war file or use the integrated installer, to verify the Flex installation, you must create a new MXML file and request that file. For more information, see the Flex documentation.

To verify the Flex installation with samples applications:

  1. Open the following URL in your browser:
    http://<hostname>:<port_num>/samples_context_root
    
    On a system that had a Java Application Server already running, you access the Flex application using the application server's port number; for example:
    http://localhost:8101/samples
    
    On a system that used the integrated install option, the default port for Flex applications is port 8700; for example:
    http://localhost:8700/samples
    
    The Flex Samples page appears.
  2. Select a sample application to run.

If a page does not display, consult the following table for troubleshooting ideas:

Problem Possible solution
Port conflicts If you created a new server for the Flex application, ensure that the ports used by that server do not conflict with other servers running on your web application server.
Web server Ensure that your web server is running.
Context root Ensure that you are using the correct context root in your request URL. For more information, see Configuring Flex.
Application server Restart your application server after deploying the flex.war file.
Flash Player Ensure that you are running the latest Flash Player. For more information, see Installing Flash Player.

Upgrading the Flex Installation

If you installed a Trial Edition of Flex but later purchase a full version or received an extension key from Macromedia Customer Service, you use the command-line license tool to upgrade your license key. The license tool is installed in the /Flex/bin directory. The license tool has the following syntax:

licensetool [-install licensekey flex_war_directory|application.war] [-info]
The flex_war_directory is the web application root directory into which Flex was installed; for example:
licensetool 42XXY1BMYKEY C:/jrun4/servers/flex/

The application.war is a WAR file that contains Flex; for example:

licensetool -install 42XXY1BMYKEY C:/Program Files/Macromedia/Flex/flex.war

To get information about the current license key, use the -info option with either an expanded WAR file or a WAR file as the argument; for example:

licensetool -info C:/jrun4/servers/flex
licensetool -info C:/Program Files/Macromedia/Flex/flex.war

Configuring Flex

Client computers store logging and configuration information for Flash Player in their home directory. This section describes how to locate your home directory and change the Flex context root.

Locating your home directory

To configure Flash Player error reporting and profiling for Flex, you must copy the mm.cfg file to the client computer's home directory. The home directory is also the location of the flashlog.txt file which stores trace output, system errors, and warning messages generated by the Flash Debug Player while running a Flex application.

Two Microsoft Windows environment variables define the location of the home directory:

  • HOMEDRIVE — Specifies the drive letter of the path to the home directory. In most Microsoft Windows systems, the default value is C:, the primary hard drive.
  • HOMEPATH — Specifies the path to the home directory, relative to HOMEDRIVE. On Microsoft Windows 2000 and Windows XP, the default is /Documents and Settings/user_name where user_name is your system user name.

To determine the settings of HOMEDRIVE and HOMEPATH for your system:

  1. Open a Command Prompt window.
  2. At the prompt, enter the following command:
    echo %HOMEDRIVE%%HOMEPATH%
    

Changing the context root

The Flex application's context root depends on how you deploy it into your Java application server. The context root of the application is the part of the URL that follows the server and port number. The following example shows a context root of /flex:

http://localhost:8101/flex

In general, if you deploy a WAR file without expanding it, the Java application server sets the name of the WAR file as the context root. If you expand the contents of a WAR file prior to deploying it (or as part of the deployment process), then the Java application server sets the name of the directory into which you copied the contents as the context root.

Flex includes a jrun-web.xml file for JRun servers that maps the context root to /flex. Macromedia recommends against deploying the flex.war file without expanding it.

To change the context-root mapping in JRun:

  1. Deploy the WAR file using the instructions in Installing Flex.
  2. Open the jrun-web.xml file in the jrun_root/server_name/flex/WEB-INF directory.
  3. Change the value of the context-root element. For example, to set your new context root to /flex_11, your context-root entry should look like the following:
    <context-root>/flex_11</context-root>
    
  4. Save and close the jrun-web.xml file.

To change the context-root mapping in other Java application servers, see your server's documentation.

Configuring Flex to Work with ColdFusion MX 6.1

You can configure Flex to work with ColdFusion MX 6.1. For more information, see Configuring Macromedia Flex for ColdFusion MX.

Getting Started

 

Application Development

 

Security

 

Downloads

 

Documentation

 

Community Resources