Specifications
171ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
Classes that you add with the include-sources option can be accessed from the generic namespace in your Flex
applications. To use them, you need to add the following code in your Flex application tag:
xmlns:local="*"
You can then use them as tags; for example:
<local:FV_calc id="calc" rate=".0125" nper="12" pmt="100" pv="0" type="1"/>
Adding nonsource classes
You often include noncompiled (or nonsource) files with your applications. A nonsource file is a class or resource
(such as a style sheet or graphic) that is not compiled but is included in the SWC file for other classes to use. For
example, a font file that you embed or a set of images that you use as graphical skins in a component’s style sheet
should not be compiled but should be included in the SWC file. These are classes that you typically do not use the
[Embed] syntax to link in to your application.
Use the
include-file option to define nonsource files in a SWC file.
The syntax for the
include-file option is as follows:
-include-file name path
The name argument is the name used to reference the embedded file in your Flex applications. The path
argument is the current path to the file in the file system.
When you use the include-file option, you specify both a name and a filepath, as the following example shows:
compc -include-file logo.gif c:/images/logo/logo1.gif ...
In a configuration file, these options appear as the following example shows:
<compiler>
<output>c:/jrun4/servers/flex2/flex/WEB-INF/flex/user_classes/Combo.swc</output>
</compiler>
<include-file>
<name>logo.gif</name>
<path>c:/images/logo/logo1.gif</path>
</include-file>
<include-classes>
<class>asbutton.MyButton</class>
<include-classes>
Each name that you assign to a resource must be unique because the name becomes a global variable.
You cannot specify a list of files with the
include-file option. So, you must add a separate include-file
option for each file that you include, as the following command-line example shows:
compc -include-file file1.jpg ../images/file1.jpg -include-file file2.jpg
../images/file2.jpg -- -output MyFile.swc










