flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [FlexJS] Using @flexjsignorecoercion to inline JavaScript
Date Fri, 16 Dec 2016 06:16:37 GMT
Hi Tim,

@flexjsignorecoercion only controls output after the parsing.  It skips
output of the JS for "as WrappedHTMLElement" so no coercion is done.  All
of the types need to be available for the parser.

The CreateJS.swc in frameworks/libs contains components that present
Flex-like APIs on top of CreateJS.  These components can be used in MXML.
The createjs.swc in js/libs contains the AS APIs for parts of CreateJS
(most of EaselJS and TweenJS).  These classes cannot be used in MXML, only
in AS.  This sounds like the swc you are missing.  It should be added to
the -external-library-path (not the -library-path).  If you have
connections to the CreateJS community, we'd love to get them more involved
and enable FlexJS to create any CreateJS app.


On 12/15/16, 8:42 PM, "Tim Diggle" <tim.diggle.us@gmail.com> wrote:

>Hi, I've been building some of the Flex JS samples and am particularly
>interested in the createjs samples. Looking at the component source, I
>notice that the @flexjsignorecoercion flag is used to allow createjs
>javascript calls to be made and the results attached to a
>WrappedHTMLElement. I was hoping we could use this directly in a Flex JS
>project to quickly prototype stuff before rolling it into a component -
>however even with the directive and the -keep-as-doc compiler setting,
>the compiler still complains about not recognizing the create js classes
>and imports. How is this overcome when the components are built, and
>where is the compiler looking to get the create is imports at that stage?
>Is it possible to inline the JavaScript directly in a project as
>described, or should we always follow the multiple compile steps to make
>a component swc to use these JavaScript libraries?
>Many thanks

View raw message