Specifications
195
Chapter 10: Using Runtime Shared
Libraries
Adobe® Flex® supports Runtime Shared Libraries (RSLs), which you can configure.
Topics
Introduction to RSLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .195
Creating libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .200
Using standard and cross-domain RSLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .202
Using the framework RSLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Troubleshooting RSLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
Introduction to RSLs
One way to reduce the size of your applications’ SWF files is by externalizing shared assets into stand-alone files
that can be separately downloaded and cached on the client. These shared assets can be loaded and used by any
number of applications at run time, but must be transferred only once to the client. These shared files are known
as Runtime Shared Libraries or RSLs.
If you have multiple applications but those applications share a core set of components or classes, clients can
download those assets only once as an RSL rather than once for each application. The RSLs are persisted on the
client disk so that they do not need to be transferred across the network a second time. The resulting file size for
the applications can be reduced. The benefits increase as the number of applications that use the RSL increases.
Flex applications support the following types of RSLs:
• Standard RSLs — A library of custom classes created by you to use across applications that are in the same
domain. Standard RSLs are stored in the browser’s cache. For more information, see
“Ab o u t s t a n d a r d R S L s” on
page 203.
• Cross-domain RSLs — A library of custom classes, like standard RSLs, with the difference being that they can
be loaded by applications in different domains and sub-domains. Cross-domain RSLs are stored in the browser’s
cache. For more information, see
“About cross-domain RSLs” on page 204.
• Framework RSLs — Precompiled libraries of Flex components and framework classes that all applications can
share. Framework RSLs are precompiled for you. For more information, see
“Using the framework RSLs” on
page 216.










