Versions Compared

Key

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

...

And the environment variables:
PLAYERGLOBAL_HOME are points to the folder containing versions of playerglobal.swc as specified above.  Thus, if you followed the instructions above on a Mac, you would set the variable to: /Users/myusername/adobe/flashplayer

For cross-compiling with FalconJX the Program Arguments are:

...

 

Anchor
AFB
AFB
Using Adobe Flash Builder

...

It is recommended to use a new empty Workspace.  You will have to specify two "Linked Resources" in Flash Builder's Preferences (under Workspace).  Create a FLEX_ASJS linked resource that points to the working copy for flex-asjs.  Create a FLEX_FALCON linked resource that points to an installed FlexJS SDK.  Setup that same FlexJS SDK as a Flex SDK in Flash Builder's Preferences.  Then, import the projects.  You may find that Flash Builder hangs building the Core SWC.  If that happens, quit Flash Builder and re-open it.  The other projects should then build.  Flash Builder may also hang if you clean all projects or the Core project.  You may find it useful to define a Working Set (of "Resources") and put all projects besides Core in that working set so you can more easily get them to build separately. Now you may have noticed that the Flash Builder project files did not generate a cross-compiled set of JS files to be included in the main SWCs.  The project files are only calling the SWF compiler to build the main SWC or "JS" SWC.  But if the cross-compiled JS files do exist, the main SWC project files will include them.  You can generated the cross-compiled JS files by running the Ant build, or you can set up a Launch Configuration to generate the JS files.

To setup the Launch Configuration, first makes sure you've imported the Launch Configurations as described in Using FlexJS with Adobe Flash Builder.  Then go to the Run menu, selected External Tools and then External Tools Configuration.  Make a copy of the FlexJS COMPC configuration, and alter the arguments to look like:

Code Block
+playerglobal.version=20 -output=${project_loc}/target/generated-sources/flexjs -fb "${project_loc}"

Be sure to set the playerglobal.version to the version you chose when installing the FlexJS SDK.  Run this launch config on the various projects that end with "JS" to generate the cross-compiled JS files.

The Demo

MXML->SWF
The latest demo is http://home.apache.org/~aharui/FlexJS/FlexJSStore. Run the bin-release/FlexJSStore.html and right-click and choose "View Source" to see the source. You should be able to compile FlexJSStore.mxml into a working SWF by using the Apache Flex SDK Installer to install a FlexJS release and using the js/bin/mxmlc on Mac or js/bin/mxmlc.bat on Windows to compile the source.  This is a port of the old FlexStore demo to FlexJS.  You can click on the Products button, hover over the people and see toolTips, drag them to the compare window and see drag-and-drop work and effects play.

MXML->JS
Now you should be able to create an HTML/JS equivalent by running js/bin/mxmlc on Mac or js/bin/mxmlc.bat on Windows.  The FalconJX compiler will generate an The compiler also generated a JS version of the example.  You should find an index.html file and a single minified .js file in bin/js-release and a debug version with many .js files in bin/js-debug.

...