Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

c) (in frameworks/projects/Core) src/main/resources/compile-as-config.xml - Settings used to compile the AS to SWF byte code and include the cross-compiled JS  from the "JS" SWC.

 

In More Detail

When compiling the Flash-specific SWC, the COMPILE::SWF conditional compilation flag is set to false and COMPILE:JS is true.  When cross-compiling AS to JS,  COMPILE::SWF set to true and COMPILE::JS set to false.

In More Detail
The "SWF" SWC and "JS" SWC have different library dependencies.  At the "bottom" is the runtime SWC.  The "SWF" SWC has an external library path that includes playerglobal.swc.  The "JS" SWC has an external library path that includes js/libs/js.swc.  Playerglobal.swc includes APIs for Flash like Sprite, the js.swc includes APIs for JS like HTMLElement.
The "JS" SWC has a library path that references other "JS" SWCs, like CoreJS.swc, and the "SWF" SWC has a library path that references other "SWF" SWCs like Core.

...

swc.
Base Classes and other classes are then written against Flash APIs for SWF or JS APIs for JS.  UIBase, for instance, extends Sprite for Flash but extends Object and wraps an HTMLElement for JS.  Conditional Compilation is used where needed.

...