Specifications
19ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
There are no inherent restrictions in Flex for the location of the root directory of your application, so you can put
it almost anywhere in the file system of your computer. If you are using Flex Builder, the default location of the
application root directory in Microsoft Windows is My Documents\Flex Builder 3\project_name (for example,
C:\Documents and Settings\userName\My Documents\Flex Builder 3\myFlexApp).
Sharing assets among applications
Typically, you do not develop a single application in isolation from all other applications. Your application shares
files and assets with other applications.
The following example shows two Flex applications, appRoot1 and appRoot2. Each application has a directory for
local assets, and can access shared assets from a directory outside of the application’s directory structure:
The location of the shared assets does not have to be at the same level as the root directories of the Flex applica-
tions. It only needs to be somewhere accessible by the applications at compile time.
In the following example, you use the Image control in an MXML file in the appRoot1 directory to access an asset
from the shared assets directory:
<?xml version="1.0"?>
<!-- apparch/EmbedExample.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Image id="loader1" source="@Embed(source='../assets/butterfly.gif')"/>
</mx:Application>
Consideration for accessing application assets
One of the decisions that you must make when you create a Flex application is whether to load your assets at run
time, or to embed the assets within the application’s SWF file.
appRoot1
localAssets
localAssets
appRoot2
sharedAssets
myApps










