![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
If you define a style in only one place in a document, Flash uses that definition when it needs to know a property's value. However, one Flash document can have a _global style declaration, custom style declarations, style properties set directly on component instances, and default class style declarations. In such a situation, Flash determines the value of a property by looking for its definition in all these places in a specific order.
First, Flash looks for a style property on the component instance. If the style isn't set directly on the instance, Flash looks at the styleName
property of the instance to see if a style declaration is assigned to it.
If the styleName
property hasn't been assigned to a style declaration, Flash looks for the property on a default class style declaration. If there isn't a class style declaration, and the property doesn't inherit its value, the _global style declaration is checked. If the property is not defined on the _global style declaration, the property is undefined
.
If there isn't a class style declaration, and the property does inherit its value, Flash looks for the property on the instance's parent. If the property isn't defined on the parent, Flash checks the parent's styleName
property; if that isn't defined, Flash continues to look at parent instances until it reaches the _global level. If the property is not defined on the _global style declaration, the property is undefined
.
The StyleManager tells Flash if a style inherits its value or not. For more information, see StyleManager class.
Note: The CSS "inherit"
value is not supported.
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |