O'Reilly logo

Agile Enterprise Application Development with Flex by Tony Hillerson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Resource-Shared Libraries

Tricks with a tiny preloader .swf can give users the feeling that your application loads quickly, but you should also endeavor to make the main application load as quickly as possible. A typical enterprise Flex RIA consists of several .swf files (the main application, fonts and styles, and modules) as well as several .swc libraries (both yours and the Flex framework’s). Your goal with these remains the same: ensure that only a minimum portion of the code travels over the network to the end user’s machine.

How to Link Flex Libraries

Right-click on a project name in Flash Builder, select the Flex Build Path option, and you’ll see a “Library path” panel similar to the one in Figure 8-4. This panel lists only the libraries from the Flex framework (AIR applications have some additional libraries). Both the framework and the necessary libraries must be linked to your project. You set the linkage method for the Flex framework via the “Framework linkage” drop-down menu (more on this in the next section). For now, however, just concentrate on linking the Flex libraries that your project needs for successful compilation and execution. To do this, click on the plus sign by the library name (see Figure 8-4) and double-click on the link method. You can choose one of three methods:

  • RSLs

  • Merged into code

  • External

The library path of a simple Flex project

Figure 8-4. The library path of a simple Flex project

A typical ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required