Specifications

197ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
You can also use the external-library-path, externs, or load-externs compiler options to specify the files
to dynamically link into an application. These options instruct the compiler to exclude classes and libraries from
the application, but to check links against them and prepare to load them at run time. The
external-library-
path
option specifies SWC files or directories for dynamic linking. The externs option specifies individual
classes or symbols for dynamic linking. The
load-externs option specifies an XML file that describes what
classes to use for dynamic linking. These options are most often used when externalizing assets from modules so
that the module and the application do not contain overlapping class definitions. The
runtime-shared-
library-path
option provides all the arguments to use external libraries as RSLs.
In Flex Builder, to use dynamically-linked libraries, you specify either RSL or External as the Link Type in the
Library Path dialog for the library.
You can view the linking information for your application by using the
link-report compiler option. This
generates a report that has the same syntax as the file that you load with the
load-externs option, so you can use
it as an argument to that option without changing it. For more information about this report, see “Examining
linker dependencies” on page 65.
For more general information about the command-line compiler options, see “Using the Flex Compilers” on
page 125.
RSL benefits
The following example shows the possible benefit of separating shared components into an RSL. In this example,
the library’s size is 150 KB (kilobytes) and the compiled applications size is 100 KB. Without RSLs, you merge the
library into both applications for an aggregate download size of 500 KB. If you add a third or fourth application,
the aggregate download size increases by 250 KB for each additional application.