Code libraries have been around for a long time. The idea is simple: put code into a repository where it can be shared or used by several applications. These days the repository is an archive file — a file of files — in a compressed format, as it tends to hold quite a lot of information. If you are familiar with Java, perhaps you have heard of the JAR file. This is a file that contains compiled Java classes.
Archive files that contain compiled code are known as libraries. Libraries are an essential part of software development. Library files make it possible to ship collections of code to many developers. You may find yourself writing components that are needed by another group. If your component is made up of several class files, placing the classes into a single file makes it easier to distribute.
Library files also make it possible to have different versions of the same code. Your component, version 1, might be in use by several groups. Once you finish version 2, you can make a new library file and send that out. Some people might use the newer library, whereas others might wait until their project is done or on a new phase of a project.
This chapter shows you how to make and use libraries, known as SWCs, using Flex Builder and command-line tools.
ActionScript also has its own archive file. The file contains compiled ActionScript classes and is identified by its
.swc file extension.
Flex applications run in the ...