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): http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs The DHTML/HTML sprite (pure JavaScript with pragma directive added as only customization): http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/lzsprite/LzSprite.js ActionScript 3 sprite implementation: http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as 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