flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raju Bitter <r.bitter.mailingli...@googlemail.com>
Subject Re: Cross-compiling Flex to HTML5/Javascript (Was : Update on Falcon donation)
Date Wed, 29 Aug 2012 12:01:19 GMT
In the case of OpenLaszlo, the decision was made to use JavaScript 2
as the main language for integration. OpenLaszlo has separate sprite
implementation for the HTML5/DHTML runtime and ActionScript 3. <view>
tags in OpenLaszlo are objects without a visual representation (not in
the display list). When a view object is instantiated in OpenLaszlo, a
runtime specific display object or sprite is created. The view API is
identical for both target runtimes, only the the sprite implementation
is runtime specific.

LZX (similar to MXML) is compiled into JavaScript 2, and then further
compiled into either ActionScript 3 or JavaScript 1.5. Once browsers
support JavaScript 2.0 it would be possible to profit from the
performance improvement, since the code contains type information.

The view class (written in JavaScript 2 like syntax with slight
modifications, therefore called LaszloScript with .lzs ending):

The DHTML/HTML sprite (pure JavaScript with pragma directive added as
only customization):

ActionScript 3 sprite implementation:

I'd say that 90% of the functionality in Flash has been reproduced
using this approach in the case of OpenLaszlo. Looking at the
implementation of the sprite classes in OpenLaszlo much could be
learned for a future FalconJS.

- Raju

View raw message