Specifications

CHAPTER 10
202
On the command line, you typically specify that the output of compiling a library be an open directory rather than
a SWC file by using the
directory option and the output option. The output is an open directory that contains
the following files:
catalog.xml
library.swf
In addition, the library contains properties files and any images or other embedded assets that are used by the
library.
If you do not specify that the output be an open directory, you must manually extract the library.swf file from the
SWC file with a compression utility, such as PKZip.
In Flex Builder, you can instruct the compiler to automatically extract the SWF file for you when you add the RSL
SWC file to the project. Doing this does not optimize the SWF file, so the library will be bigger than if you extract
it yourself and optimize it.
To manually extract an RSL SWF file from its SWC file in Flex Builder, add the
output and directory options
to the Additional Compiler Arguments field in the Flex Compiler dialog box. In both cases, you specify the
deployment location of the SWF file when you add the SWC file to your project as an RSL.
When creating a library, you need to know if you will be using the library as a standard RSL or as a cross-domain
RSL. If you are using it as a cross-domain RSL, you must include the digest information in the library. For more
information, see About cross-domain RSLs” on page 204.
After you create the library, you then compile your application against the SWC file and specify the library’s SWF
files location for use at run time. For more information, see “Compiling applications with standard and cross-
domain RSLs” on page 206.
For more information on using the compc compiler options, see “Using the Flex Compilers” on page 125.
Using standard and cross-domain RSLs
Standard and cross-domain RSLs are RSLs that you create from your custom component libraries. These RSLs are
different from signed framework RSLs in that they are unsigned and can only be stored in the browsers cache.
They are never stored in the Player cache.
To use standard or cross-domain RSLs, you perform the following tasks:
Create a library An RSL is created from a library of custom classes and other assets. You can create a
library with either the Flex Builder Library Project or the compc command-line compiler. You can output the
library as a SWC file or an open directory. The library includes a library.swf file and a catalog.xml file; the
library.swf file is deployed as the RSL. For more information, see “Creating libraries on page 200.