You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

Follow these instructions to use Flash Builder 4.7 for developing FlexJS applications.  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 https://builds.apache.org/job/flex-asjs/lastSuccessfulBuild/artifact/out/
  2. In the folder where you expanded the FlexJS Nightly Build, run ant -f installer.xml and follow the prompts.
  3. Run Flash Builder
  4. In the Flash Builder Preferences menu add this new folder as a Flex SDK.
  5. Choose from the File menu, Import, Run/Debug, Launch Configurations
  6. Choose the ide/flashbuilder folder from this new folder.
    There should now be two 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 instructions.
  4. Run Flash Builder
  5. In the Flash Builder Preferences menu add 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 the folder where you installed FlexJS.
    There should now be two new configs in the Run menu under External Tools

Creating a FlexJS Application

Flash Builder does not currently know how to create new FlexJS Application. The recommended way to create a new Application is to copy an existing working example and modify it as follows:

  1. Create a new Flex Project
  2. Choose this modified Apache Flex SDK
  3. Hit OK. Flash Builder will generate a new project and a new Application MXML file that has errors. Ignore those errors for now.
  4. Get the example source for the DataBindingTest from http://people.apache.org/~aharui/FlexJS/DataBindingTest/bin-release/srcview/DataBindingTest.zip
  5. Copy the contents of DataBindingTest.mxml into your Application MXML file. The current tools require that the Application name matches the Project name so you can't just copy DataBindingTest.mxml to the source folder and make that the default Application for the project.
  6. Copy the rest of the files to the source folder for your project.
  7. Rename the references to DataBindingTest in the other source files to match your Application's name.

Building and Running/Debugging

As you edit the code, the new compiler known as Falcon is compiling and reporting errors. You should be able to set breakpoints and debug as you would any other Flex project.

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

The FlexJS prototype is so new, that nobody has attempted to convert an existing application since significant functionality is probably missing. However, the steps should be:

  1. In the Project Properties, change the Flex SDK.
  2. In each MXML file, change the xmlns for mx or s (or both) to library://ns.apache.org/flexjs/basic
  3. You will then have to fix lots of errors in your code where your code uses imports and API from Flex SDK classes that are not currently supported in FlexJS.

Getting Help

Please ask questions on the dev@flex.apache.org mailing list. Please start the subject of your email with "[FlexJS]". 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.

  • No labels