We (actually, my coworker Bill) got the entire Starling 2.0 framework successfully transpiled to JavaScript using FalconJX!
We are using lizhi's spriteflexjs library to provide code for the flash runtime APIs. In order to get a successful compilation, we developed a way to emit the goog requires and depends in a way that is correct for ActionScript3 import and extends, avoiding circular dependencies. At a high level, here's how the code organization changed: * Static class var initialization is run later, not when the js file is loaded. * All requires (other than extend/inherit classes) moved to the project-dependencies.js file. A handful of ActionScript code workarounds were required in the Starling 2.0 codebase, which we hope to turn into FalconJX unit tests, and pursue fixes. Hacks to the Starling 2.0 code include: * internal class vars were changed to public. * Local functions (functions inside of functions) needed to be assigned to and accessed through a var. * Inline XML (in the Starling demo class) commented out for now. * One place using "apply" did not emit properly formed JavaScript code; worked around for now. * The namespace "starling.core.starling_internal" was showing up in requires but is not a module. * The @flexjsignorecoercion was used to ignore casts to Class. * Other uses of Class commented out for now, such as "if (foo is Class)..." * Vars inside of class methods were confused by class accessors (getters) of the same name. Where are we now? We have JavaScript code that loads and runs in the browser, but it doesn't get very far. There are more Flash APIs that need filling out in the spriteflexjs library. We will enumerate what we've found so far. We are working on a patch or pull request with the FalconJX compiler code changes related to the use of goog requires and depends. -- View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Starling-framework-compiled-to-JavaScript-tp52188.html Sent from the Apache Flex Development mailing list archive at Nabble.com.