A symbol is a named grouping tag that can be made up of
other symbols and graphic elements. You can define a symbol once
and reuse it any number of times in an FXG document by using the <Library> and <Definition> elements. In
MXML graphics, you use the MXML file’s <fx:Library> and <fx:Definition> tags.
In FXG, the <Library> tag contains <Definition> elements.
The <Library> tag can only be placed as a
child of the root tag of an FXG document, just as the <fx:Library> tag
can only be a child of the root tag in an MXML file. Symbols defined
in a library can be referenced by name anywhere in the document.
In FXG, the <Library> tag must be the
first child of the root tag.
The FXG
<Definition> tag and the MXML
<fx:Definition> tag
can contain only a Group or other symbols. You cannot nest definitions,
as the following example shows:
<!-- This is illegal. -->
<Library>
<Definition name="A">
<Definition name="B"/>
</Definition>
</Library>
You can, however, reference symbols inside definitions. Symbols
can be used anywhere a Group can be used, as the following example
shows:
<!-- This is OK. -->
<Library>
<Definition name="A/>
<Definition name="B">
<A/>
</Definition>
</Library>
All attributes that are legal on an instance group are also legal
on a symbol.
Libraries can have any number of definitions. Each definition
defines a named symbol that you can reuse in that document. For
example, you can define a rectangle shape in your library, and then
use that rectangle shape any number of times in the document. The
named symbol can optionally contain effects such as color transforms,
filters, blend modes, or masks. These elements can appear in any
order in FXG.
For more information about using the <fx:Library> and <fx:Definition> language
tags in MXML, see ActionScript 3.0 Reference for the Adobe
Flash Platform.