Specifications
165ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
To use components that are not in a package in a Flex application, you must declare a namespace that includes the
directory structure of the components. The following example declares a namespace for the components compiled
in the previous example:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmln:local="rotationclasses.*">
...
<local:Rotation id="Rotate75" angleFrom="0" angleTo="75" duration="100"/>
...
</mx:Application>
To use the generic namespace of “*” rather than a namespace that includes a component’s directory structure, you
can include the directory in the
source-path as the following command-line example shows:
compc -source-path . c:/flexdeploy/comps/rotationClasses
-output c:/jrun4/servers/flex2/flex/WEB-INF/flex/user_classes/RotationComps.swc
-include-classes Rotation RotationInstance
Then, you can specify the namespace in your application as:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmln:local="*">
You are not required to use the directory name in the include-classes option if you add the directory to the
source path.
These options appear in a configuration file, as the following example shows:
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>c:/flexdeploy/comps/rotationClasses</path-element>
</source-path>
<output>c:/jrun4/servers/flex2/flex/WEB-INF/flex/user_classes/
RotationComps.swc</output>
</compiler>
<include-classes>
<class>Rotation</class>
<class>RotationInstance</class>
<include-classes>
This example assumes that the components are not in a named package. For information about compiling
packaged components, see “Compiling components in packages” on page 166.










