115ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
To create an RSL SWC file, you add files to a library by using the include-classes and include-namespaces
component compiler options. To use RSLs when compiling your application, you use the
external-library-
path
, externs, load-externs, and runtime-shared-libraries application compiler options. The
external-library-path, externs, and load-externs options provide the compile-time location of the
libraries. The
runtime-shared-libraries option provides the run-time location of the shared library. The
compiler requires this for dynamic linking.
For more information, see “Using Runtime Shared Libraries” on page 195.
Themes
A theme defines the look and feel of a Flex application. A theme can define something as simple as the color
scheme or common font for an application, or it can be a complete reskinning of all the components used by the
application.
Themes usually take the form of a SWC file. However, themes can also be composed of a CSS file and embedded
graphical resources, such as symbols from a SWF file.
Theme files must be available to the compiler at compile-time. You build a theme file by using the
include-file
and
include-classes component compiler options to add skin files and style sheets to a SWC file. You then
reference the theme SWC file when you compile the main Flex application by using the
theme application
compiler option.
For more information about themes, see “Using Styles and Themes” on page 589 in the Adobe Flex 3 Developer
Guide.
Resource bundles
You can package libraries of localized properties files and ActionScript classes into a SWC file. The application
compiler can then statically use this SWC file as a resource bundle. For more information about creating and using
resource bundles, see “Localizing Flex Applications” on page 1101 in the Adobe Flex 3 Developer Guide.
Other assets
Other application assets include images, fonts, movies, and sound files. You can embed these assets at compile
time or access them at run time.
When you embed an asset, you compile it into your applications SWF file. The advantage of embedding an asset
is that it is included in the SWF file, and can be accessed faster than when the application has to load it from a
remote location at run time. The disadvantage of embedding an asset is that your SWF file is larger than if you
load the resource at run time.
CHAPTER 6
116
The alternative to embedding an asset is to load the asset at run time. You can load an asset from the local file
system in which the SWF file runs, or you can access a remote asset, typically though an HTTP request over a
network.
Embedded assets load immediately, because they are already part of the Flex SWF file. However, they add to the
size of your application and slow down the application initialization process. Embedded assets also require you to
recompile your applications whenever your asset files change.
For more information, see “Embedding Assets” on page 965 in the Adobe Flex 3 Developer Guide.

Get ADOBE® FLEX® 3: BUILDING AND DEPLOYING ADOBE FLEX 3 APPLICATIONS now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.