Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Follow these instructions to use Flash Builder 4.7 for developing FlexJS applications.

Setup instructions are:

 Note that all the software involved is under development and not an official release from Apache.  There are two ways to setup FlexJS, one uses Apache Ant (recommended for Linux users) and the other uses a prototype of the Apache Flex Installer 3.0.

Setup Instructions Using Apache Ant:

  1. Download and expand a FlexJS Nightly Build from 
  2. Install Apache Flex 4.9 or later as an SDK in FB.
  3. Shut down FB
  4. Install Google Closure library. You can get a zip from: http://code.google.com/p/closure-library/downloads/list
  5. Set the environment variable GOOG_HOME to point to the folder that contains the closure and third_party folders. This folder's name and location may be different in different version of Google Closure.
  6. Unzip ApacheFlexJS.zip (win) or ApacheFlexJS.tar.gz (mac) from https://builds.apache.org/job/flex-asjs/lastSuccessfulBuild/artifact/out/ into an empty folder. (Note that this is a "nightly-build" and not an official Apache release).
  7. In the folder where you expanded the FlexJS Nightly Build, run ant -f installer.xml and follow the prompts.
  8. Run Flash Builder
  9. In the Flash Builder Preferences menu add this new folder as a Flex SDK.
  10. Choose from the File menu, Import, Run/Debug, Launch Configurations
  11. Choose the ide/flashbuilder folder from this new folder.
    There should now be several new configs in the Run menu under External Tools

Setup Instruction Using Apache Flex Installer 3.0 (Prototype):

  1. Download and run the prototype of the Apache Flex Installer 3.0 from http://people.apache.org/~aharui/Installer You will have to uninstall any older version of the Apache Flex Installer before running it.
  2. Choose the Apache FlexJS Nightly from the list of options.
  3. Follow the installation instructionsChange to that folder and run deploy.sh or deploy.bat <path to Apache Flex SDK folder>
    Note that the deploy script will copy the AIR and FlashPlayer SDKs from the Apache Flex SDK folder and create a few other files and folders required to make Flash Builder recognize that folder as a Flex SDK.
  4. Run Flash Builder
  5. In the Flash Builder Preferences menu add this new folder the folder where you installed FlexJS as a Flex SDK.
  6. Choose from the File menu, Import, Run/Debug, Launch Configurations
  7. Choose the ide/flashbuilder folder from this modified copy of the Apache Flex SDKthe folder where you installed FlexJS.
    There should now be several new configs in the Run menu under External Tools

...

As you edit the code, the regular Flex compiler is compiling and reporting errors, but it only knows how to build Flex SWFs so the output SWF won’t run. So, before you debug, select the main MXML file from the Package Explorer and choose from the Run menu the new External Tool: “FlexJS (Debug Build)”. This will run the Falcon compiler with the right options to generate a SWF in the bin-debug folder that overwrites the one that is there. Then you should be able to set breakpoints and debug.The Falcon compiler cannot currently access your project's settings so any custom compiler options, library and source-paths must be added to the Launch Configuration.

Once you have your app working as a SWF, try the FalconJX tool in the Run menu. It will output a debug version to the bin/js-debug and a minified version to the bin/js-release folder. Run the index.html in a browser.

Converting an Existing Flex Application

...

Please ask questions on the dev@flex.apache.org mailing list. Please start the subject of your email with "[FLEXJSFlexJS]". You may file bugs at https://issues.apache.org/jira/browse/FLEX under the component "FlexJS". Remember, Apache projects like Apache Flex is mostly staffed by volunteers so response times may vary and any contributions like patches are welcome.