Specifications
CHAPTER 4
66
The following table describes the tags used in this file:
You can examine the list of prerequisites and dependencies for your application definition. You do this by
searching for your application’s root MXML file by its name; for example, MyApp.mxml. You might discover that
you are linking in some classes inadvertently. When writing code, it is common to make a reference to a class but
not actually require that class in your application. That reference causes the referenced class to be linked in, and
it also links in all the classes on which the referenced class depends.
If you look through the linker report, you might find that you are linking in a class that is not needed. If you do
find an unneeded class, try to identify the linker dependency that is causing the class to be linked in, and try to
find a way to rewrite the code to eliminate that dependency.
Avoiding initializing unused classes
Some common ways to avoid unnecessary references include avoiding initializing classes you do not use and
performing type-checking with the
getQualifiedClassName() method.
The following example checks if the class is a Button control. This example forces the compiler to include a Button
in the SWF file, even if the child is not a Button control and the entire application has no Button controls.
Tag Description
<script>
Indicates the name of a compilation unit used in the creation of the application SWF file. Compilation units must contain
at least one public definition, such as a class, function, or namespace.
The name attribute shows the origin of the script, either from a source file or from a SWC file (for example, frame-
works.swc).
If you set keep-generated=true on the command line, all classes in the generated folder are listed as scripts in this
file.
The size attribute shows the class' size, in bytes.
The mod attribute shows the time stamp when the script was created.
<def>
Indicates the name of a definition. A definition, like a script, can be a class, function, or namespace.
<pre>
Indicates a definition that must be linked in to the SWF file before the current definition is linked in. This tag means
prerequisite.
For class definitions, this tag shows the direct parent class (for example, flash.events:Event), plus all implemented inter-
faces (for example, mx.core:IFlexDisplayObject and mx.managers:ILayoutClient) of the class.
<dep>
Indicates other definitions that this definition depends on (for example, String, _ScrollBarStyle, and mx.core:IChildList).
This is a reference to a definition that the current script requires.
Some script definitions have no dependencies, so the <script> tag might have no <dep> child tags.
<ext>
Indicates a dependency to an asset that was not linked in. These dependencies show up in the linker report when you
use the
external-library-path, externs, or load-externs compiler options to add assets to the SWF file.










