On 11/2/16, 10:35 AM, "PKumar" <[email protected]> wrote:
>Thanks Alex, better to use github URl to save the effort. but one more >thing >i want to ask. can i use the "externc" compiler command to convert amfjs >to action script? > It depends on what you are trying to do. All ExternC does is convert externs-formatted JS files to AS. IOW, it only knows about API signatures and can't convert function bodies and lots of other things, so it isn't a migration from JS to AS tool. Depending on how you've written your code, you may need to create an externs-formatted copy of amfjs and run it through ExternC. That's how the createjs.swc in flex-typedefs repo is handled. That allows other developers to call CreateJS APIs directly. The externs-formatted file is needed to convince the Google Closure Compiler to not minify the variable names in your code that call APIs in the CreateJS library. In some other cases, the APIs of an existing library are not very Flex-like and the library needs to be wrapped in another, more Flex-oriented layer. The CreateJS.swc in the flex-asjs repo puts an MXML-friendly layer on top of the createjs.swc from the flex-typedefs repo. HTH, -Alex
