User Guide

90 Customizing Components
Setting inheriting styles on a container
An inherited style is a style that inherits its value from parent components in the documents
MovieClip hierarchy. If a text or color style is not set at an instance, custom, or class level,
Flash searches the MovieClip hierarchy for the style value. Thus, if you set styles on a
container component, the contained components inherit these style settings.
The following styles are inheriting styles:
fontFamily
fontSize
fontStyle
fontWeight
textAlign
textIndent
All single-value color styles (for example, themeColor is an inheriting style, but
alternatingRowColors is not)
The Style Manager tells Flash whether a style inherits its value. Additional styles can also be
added at runtime as inheriting styles. For more information, see StyleManager class in the
Components Language Reference.
Inherited styles take priority over global styles. For a list of style precedence, see “Using global,
custom, and class styles in the same document” on page 92.
The following example demonstrates how inheriting styles can be used with an Accordion
component, which is available with Flash Professional 8. (The inheriting styles feature is
supported by both Flash Basic 8 and Flash Professional 8.)
NOTE
One major difference between the implementation of styles for Flash components, and
cascading style sheets for HTML pages, is that the CSS inherit value is not supported
for Flash components. Styles are either inherited or not by component design.