You are correct: currently, playerglobal.swc or airglobal.swc is needed to compile the SWF. Most of the examples are web apps, but we have a few that use AIR APIs.
I can’t guarantee it will be that way forever. There could be configurations of FlexJS where folks don’t generate a SWF. Then we might make possible to install a FlexJS SDK without any Adobe swcs involved. -Alex On 4/22/15, 10:49 PM, "Christofer Dutz" <christofer.d...@c-ware.de> wrote: >Ok ... I was thinking about this change of yours ... is there any >"global" artifact in FlexJS? >I know that I dug through that topic in preparation of the last ApacheCon >I talked about that, but don't know if things have changed since. > >In Flash it was the playerglobal, Air the airglobal ... Flexmojos used >this to detect some stuff. >I would assume you still need a reference to the playerglobal in order to >compile the swf part, am I correct? > >Just want to know if I have to disable some security checks in Flexmojos >and how I would have to change them. > >And please forgive me using a German saying ... don't know if this exists >in english the same way. I always keep forgetting that we all come from >different cultures ... code-talk is always the same, but not the slang ;-) > >Can't wait to try this out. > >Chris > >________________________________________ >Von: Christofer Dutz <christofer.d...@c-ware.de> >Gesendet: Mittwoch, 22. April 2015 20:59 >An: dev@flex.apache.org >Betreff: AW: AW: AW: [FlexJS] More SWCs > >Hi Alex, > >If I wouldn't have to swim through the Atlantic, I would come over an >kiss you for that ;-) >From reading your post I think all I have to to in order to make >Flexmojos fully support FlexJS is actually to tear out some code I added >for unpacking the JS stuff. > >Looking forward to experimenting a little with this :-) > >Chris > > > >________________________________________ >Von: Alex Harui <aha...@adobe.com> >Gesendet: Mittwoch, 22. April 2015 19:14 >An: dev@flex.apache.org >Betreff: Re: AW: AW: [FlexJS] More SWCs > >I have pushed the changes such that JS files now get packaged in the SWCs. > See the compile-config.xml files in the new SWC projects to see how it is >done. Basically, the include-file directive now takes wildcards. > >This now means that a cross-compile only requires one more parameter >(-js-output-type=FLEXJS) than a SWF compile. Third parties will be able >to deliver a single SWC and adding it to a -library-path should make it >work for both SWF and HTML/JS/CSS. > >For ease of development, you can still use the -sdk-js-lib parameter to >point to a folder of JS files so you can skip the SWC packaging step when >debugging JS changes. > >And hopefully it will make FlexJS for friendly to Maven users as well. > >My next task is to review why we still have classes in the mx package in >FlexJS. Early versions of FlexJS used MXMLC for the SWF compile because >Flash Builder hooked into MXMLC. Now that we have FB hooking into Falcon, >it might be possible to get rid of the “mx” requirements. Hopefully, FB >doesn’t have any actual dependencies itself. > >Once I get through that, I next want to see if I can remove the need for >the FlexJS install to download a Flex SDK. > >And after all that, I’d like to get a release out. Right now, after all >of these changes (Object.defineProperty, more swcs, JS co-packaging) a >cross-compile spits out a lot of warnings from the Google Closure >compiler. I’d welcome any help in getting rid of those warnings. > >Thanks, >-Alex > >On 4/10/15, 1:46 PM, "Christofer Dutz" <christofer.d...@c-ware.de> wrote: > >>Reading this, by that change we would actually get FlexMojos support out >>of the box :-) Great stuff! >> >>I remember the night I had to work through to get the first Flexmojos >>FlexJS build up and runnning prior to the Apache EU last year :-) The >>main problem was that the SWCs weren't at all different from the >>"default" ones and that the structure of the JS stuff was completely >>different and monolithic. >> >>As soon as I have the Mavenizer out the door, That nasty Flexmojos Bug >>fixed and my latest changes to the mavenizer reflected in Flexmojos ... >>ok ... perhaps I'll stick a few hours in FlexUnit and then I'll be glad >>to help get FlexJS on the road :-) >> >>Chris >> >>________________________________________ >>Von: Alex Harui <aha...@adobe.com> >>Gesendet: Freitag, 10. April 2015 17:32 >>An: dev@flex.apache.org >>Betreff: Re: AW: [FlexJS] More SWCs >> >>Mike, Fred, >> >>Thanks for the info. Sounds like you did something more complex than >>what >>I’m thinking, or maybe I’m not considering something. I sure hope it >>doesn’t take me 4 months. What were the difficult parts of doing this? >> >>You can already stick files in a SWC. They are just zip archives. I was >>just going to have COMPJSC open the SWC, jam the folder of js files it >>created into the SWC and update the catalog.xml. MXMLJSC would open the >>SWCs and deploy the JS files to the js-debug output folder. >> >>I’ll definitely take a closer look at the Randori Bundle code when I >>actually get around to this. >> >>Thanks again, >>-Alex >> >>On 4/10/15, 6:17 AM, "Michael Schmalle" <teotigraphix...@gmail.com> >>wrote: >> >>>Fred, haha I was JUST ABOUT TO POST THAT LINK! Wow weird! :) >>> >>>On Fri, Apr 10, 2015 at 9:15 AM, Frédéric THOMAS >>><webdoubl...@hotmail.com> >>>wrote: >>> >>>> Hi Alex, >>>> >>>> Thinking about it, if your goal is to pack up JS and SWCs files >>>>together >>>> in a resource bundle file and make the compiler to read it, I guess >>>>most of >>>> this work as been done already around the concept of Resource Bundle >>>> Library (.rbl files) in Randori [1], if this matches your needs, I >>>>don't >>>> think it is hard to pick up. >>>> >>>> Frédéric THOMAS >>>> >>>> [1] >>>> >>>>https://github.com/RandoriAS/randori-compiler/tree/develop/src/test/jav >>>>a >>>>/ >>>>randori/compiler/bundle >>>> >>>> > From: christofer.d...@c-ware.de >>>> > To: dev@flex.apache.org >>>> > Subject: AW: [FlexJS] More SWCs >>>> > Date: Fri, 10 Apr 2015 07:02:24 +0000 >>>> > >>>> > Hi Alex, >>>> > >>>> > I was hoping to finish my other stuff sooner and then be able to >>>>assist >>>> you with this. >>>> > As I don't know how long I need to fix one bug in Flexmojos I >>>>stumbled >>>> over yesterday, I'll write up my whishlist ;-) >>>> > >>>> > It would be great if a FlexJS archive would contain both the >>>> flash-related classes as well as the matching js portions (eventually >>>>in a >>>> directory "js") so I can change Flexmojos to unpack all "js/**" stuff >>>>to a >>>> local directory and use that for compiling. Currently I have to add >>>>the >>>>swc >>>> deps normally and add the big fat js-resources archive as a compiler >>>> dependency. Bringing both together would be a MAJOR benefit for all >>>> "(Better) IDE support" issues out there ;-) >>>> > >>>> > Chris >>>> > >>>> > ________________________________________ >>>> > Von: Alex Harui <aha...@adobe.com> >>>> > Gesendet: Freitag, 10. April 2015 08:05 >>>> > An: dev@flex.apache.org >>>> > Betreff: [FlexJS] More SWCs >>>> > >>>> > Hi, >>>> > >>>> > As I mentioned in “The Big Rename”, I’m thinking of creating more >>>>SWCs. >>>> > As I started in on it, it occurred to me that after this >>>>refactoring, >>>>my >>>> > next goal is to try to see if we can pack the JS files into a SWC so >>>>the >>>> > SWC becomes the single deliverable for a library. Doing so >>>>simplifies >>>> the >>>> > command-line syntax so it is the same for both AS and JS, and I >>>>think >>>>it >>>> > makes it easier for Maven to work with FlexJS SWCs. >>>> > >>>> > But the question that I came up with is, if we do pack JS in the >>>>SWCs: >>>> how >>>> > many SWCs should there be? For example, right now, for charts, some >>>>of >>>> > the charts code is in the FlexJSUI SWC and thus has handwritten JS, >>>>and a >>>> > bunch more code is in the FlexJSJX SWC and the JS is generated by >>>> > cross-compiling the AS. >>>> > >>>> > The easiest thing to do right now is simply carve the chart files >>>>from >>>> > FlexJSJX into a SWC and the other chart files from FlexJSUI into >>>>their >>>> own >>>> > SWC, but then you have the charting code divided between two SWCs. >>>>Maybe >>>> > it is better to try to re-work the build scripts and CompC to put >>>>all >>>>the >>>> > chart code in one SWC. What do others think? >>>> > >>>> > Related, we could make lots of small swcs or fewer bigger ones. >>>>What >>>>do >>>> > folks think of that? There could be a SWC for: >>>> > >>>> > -Effects >>>> > -Collections >>>> > -Binding >>>> > -Graphics >>>> > -HTTPService >>>> > -Charts >>>> > -Mobile >>>> > -Formatters >>>> > -DragDrop >>>> > -Google Maps >>>> > -Jquery >>>> > -CreateJS >>>> > >>>> > And, if we actually have two SWCs (one for cross-compiled code, one >>>>for >>>> > handwritten JS) that’s a lot of SWCs. >>>> > >>>> > Anyway, let me know your thoughts, but I’m thinking that lots of >>>>SWCs >>>> > might be the better route. >>>> > >>>> > -Alex >>>> > >>>> >>>> >> >