flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [FalconJX][FlexJS] JS.SWC in Nightly Build (was [DISCUSS] Release Apache Flex Installer 3.2)
Date Mon, 15 Jun 2015 05:04:56 GMT
OK, I believe that if you go and install the FlexJS Nightly, you can go to
the folder where you installed it and type:

  js/bin/jsc path/to/Main.as

On Windows:
  js\bin\jsc.bat path\to\Main.as

And you’ll get a JS file out.  The JS file has some extra CSS stuffed on
the end that I’m going to try to remove tonight.  Also, on Windows, you
may need to make sure that jsc.bat is using Java 1.7 or later.  The
Installer sometime finds old Java 1.6 installs.

The Main.as I tried looks like this:

    public class Main
        public function start():void
            var element:Element = document.createElement("button");
            element.onclick = function ():void {
                alert("Hello browser from FalconJX!");
            element.textContent = "Say Hello";

I haven’t tried all this in FB yet.  I would think you would have to
create an ActionScript project and add JS.swc, which is currently in
js/libs/temp/externals/bin.  I might move the swc up under js/libs soon.

The JS output will have goog.provide, goog.require and goog.inherit in it,
and org.apache.flex.utils.Language if you used “is” or “as”.  This is what
I plan to use to write the JS code for FlexJS, and once your test gets
more sophisticated, you’ll need some sort of dependency management and
subclassing scheme.  This will hopefully make it easier for folks to see
where we might swap out the goog stuff for alternatives.

Let us know if it doesn’t work for you.


View raw message