Search code examples
apache-flexflex4.5swcrsl

Large flex project, how can I convert my swc libraries to a RSL?


my Flex project has grown to over 1 Mb in size in release mode and now I am trying to cut it up into modules.

One of my SWC libraries is fairly large and I want to use it in multiple modules, so I think I can turn it into a RSL? how can I go about turning the SWC library into a RSL? I am building with Flash Builder (Flex).


Solution

  • You can pass the following parameters to mxmlc compiler:

    -runtime-shared-library-path=path/to/your_lib.swc,http://lib-url/your_lib.swf -verify-digests=false
    

    Pay attention, that for linkage you should use SWC, but rsl you're going to load, should be an SWF (not SWC). To get SWF from SWC: open *.swc file with archiver (e.g. WinRAR) and extract *.swf from it.