On Fri, May 29, 2015 at 3:00 PM, Erik de Bruin <e...@ixsoftware.nl> wrote:
> Unless I'm mistaken, the idea is to use AS instead of JS to code for > the web. That would bring AS on par with the other 'higher level' > languages (CoffeeScript, TypeScript, Dart, and the rest: [1]) that > compile down to JS, using JS basically as the Assembly for the web. > > EdB > Correct. It's been a dream of mine for years. Why? I don't know, it's fun. :) Also, like Josj could implement Feathers like UI frameworks in AS that target Canvas or WebGL. Mike > > 1: > https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile-to-JS > > > > On Fri, May 29, 2015 at 8:51 PM, OmPrakash Muppirala > <bigosma...@gmail.com> wrote: > > This is pretty cool! > > > > What happens when you run the AS version? > > > > Thanks, > > Om > > On May 29, 2015 10:05 AM, "Frédéric THOMAS" <webdoubl...@hotmail.com> > wrote: > > > >> Cool stuff, very promising :-) > >> > >> Frédéric THOMAS > >> > >> > Date: Fri, 29 May 2015 12:25:25 -0400 > >> > Subject: [FalconJX JXEmitter] Hello Greeter! working :: AS cross > >> compiling to vanilla Javascript > >> > From: teotigraphix...@gmail.com > >> > To: dev@flex.apache.org > >> > > >> > Hi, > >> > > >> > Well using some of the 100's of hours I had into development of a > >> > "different" compiler, out of the shear joy of reusing time I lived I > have > >> > the following compiling with FalconJX and the JXEmitter. > >> > > >> > I have the builtin.swc and HTMLCoreLib.swc loaded in FalconJX when > >> > compiling, no playerglobal.swc. > >> > > >> > I also have full code completion in IntelliJ using no SDK just the > >> > builtin.swc and HTMLCoreLib.swc. > >> > > >> > Window.document and Window. automatically get boiled down into global > in > >> > the emitter, pretty neat, it just majically works on the JS side. > >> > > >> > Not bad for a days work. :) > >> > > >> > ---------------------------------------------------------------------- > >> > Using this html; > >> > ---------------------------------------------------------------------- > >> > > >> > <!DOCTYPE html> > >> > <html> > >> > <head> > >> > <script type="text/javascript" src="Greeter.js"></script> > >> > </head> > >> > > >> > <body> > >> > > >> > <script type="text/javascript"> > >> > Greeter.start(); > >> > </script> > >> > > >> > </body> > >> > </html> > >> > > >> > > >> > *We get the screenshot of;* > >> > > >> > http://snag.gy/Mtiln.jpg > >> > > >> > ---------------------------------------------------------------------- > >> > Greeter.as > >> > ---------------------------------------------------------------------- > >> > > >> > package > >> > { > >> > public class Greeter > >> > { > >> > public var greeting:String; > >> > > >> > public function Greeter(greeting:String) > >> > { > >> > this.greeting = greeting; > >> > } > >> > > >> > public function greet():String > >> > { > >> > return "Hello, " + greeting; > >> > } > >> > > >> > public static function start():void > >> > { > >> > var greeter:Greeter = new Greeter("how are you FalconJX?"); > >> > > >> > var button:Element = Window.document.createElement("button"); > >> > button.textContent = "Say Hello"; > >> > button.onclick = function ():void > >> > { > >> > Window.alert(greeter.greet()); > >> > }; > >> > Window.document.body.appendChild(button); > >> > } > >> > } > >> > } > >> > > >> > *Cross compiled to Javascript;* > >> > > >> > ---------------------------------------------------------------------- > >> > Greeter.js > >> > ---------------------------------------------------------------------- > >> > > >> > function Greeter(greeting) { > >> > this.greeting = greeting; > >> > } > >> > > >> > Greeter.prototype.greet = function() { > >> > return "Hello, " + this.greeting; > >> > }; > >> > > >> > Greeter.start = function() { > >> > var greeter = new Greeter("how are you FalconJX?"); > >> > var button = document.createElement("button"); > >> > button.textContent = "Say Hello!"; > >> > button.onclick = function() { > >> > alert(greeter.greet()); > >> > }; > >> > document.body.appendChild(button); > >> > }; > >> > > >> > Mike > >> > > > > -- > Ix Multimedia Software > > Jan Luykenstraat 27 > 3521 VB Utrecht > > T. 06-51952295 > I. www.ixsoftware.nl >