Hi Folks,

A quick update on FlexJS before I spend the next several days on the release 
and on vacation:


 1.  We have prototypes of a List, Button and a Label
 2.  We have a prototype of a HTTPService and a LazyCollection
 3.  The FlexJSTest_again example is updated so you can choose a stock symbol 
from the List, hit a Button and see the stock price in the Label
 4.  Peter has built out a TextInput and TextArea in AS and is working on the 
JS equivalents

If you want to play with the AS/MXML/SWF side of this stuff and are too lazy to 
build from the sources, I have hacked together a way for you to try it in Flash 
Builder.   I have put a zip file called FlexJSOverlay.zip in my folder on 
people.a.o.

Setup instructions are:


 1.  Get Apache Flex 4.9 working in FB.  (I tried it with FB 4.7, but not FB 
4.6)
 2.  Shut down FB
 3.  Make a copy of your Apache Flex 4.9 folder.  The zip file contains a shell 
script that will neuter the Flex aspects of this folder and replace it with 
FlexJS stuff.  It worked on my Mac, haven’t tried Windows yet.
 4.  Unzip FlexJSOverlay into a some other folder.
 5.  Change to that folder and run deploy.sh <path to copy of Apache Flex 4.9 
folder>
 6.  Run Flash Builder
 7.  Choose from the File menu, Import, Run/Debug, Launch Configurations
 8.  Choose the ide/flashbuilder folder from this copy of Apache Flex 4.9 we 
are mucking with.
 9.  There should now be two new configs in the Run menu under External Tools
 10. In the Flash Builder menu, choose Preferences and add this new folder as a 
Flex SDK.

Now for each project:


 1.  Create a new Flex Project
 2.  Choose this modified Apache Flex SDK
 3.  Do not change the output folder from bin-debug
 4.  Flash Builder will generate a totally messed up Application tag so replace 
it with this template:

<?xml version="1.0" encoding="utf-8"?>
<basic:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
                   xmlns:basic="library://ns.apache.org/flexjs/basic"
                   >
</basic:Application>

Source Code

Right now, Application doesn’t contain any UI, it takes another MXML file as 
the initialView property and a model and a controller.  You can reference the 
example in FlexJSTest_again.

Building and Running/Debugging

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 probably 
won’t run.  So, before you debug, 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.

I’m sure there’ll be lots of issues, but feel free to comment or contribute.  
After the release I will be tweaking either FalconJS and/or FalconJX to plug 
into Flash Builder and generate the JS version.  For now, you’ll have to build 
and run FalconJS and manage the resulting JS files as I’ve described in the 
Wiki.

--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui

Reply via email to