Using ActionScript 3.0 Components |
|
|
|
| Customizing the UI Components > Setting styles | |||
A component's styles generally specify values for its skins, icons, text formatting, and padding when Flash draws the component in its various states. For example, Flash draws a Button with a different skin to show its down state, which occurs when you click the mouse button on it, than it does to show its up or normal state. It also uses a different skin when it's in a disabled state, which is caused by setting the enabled property to false.
You can set styles for components at the document, class, and instance levels. In addition, some style properties can be inherited from a parent component. For example, the List component inherits ScrollBar styles in inheriting from BaseScrollPane.
You can set styles to customize a component in the following ways:
You can change color and text properties for a single component instance. This is effective in some situations, but it can be time consuming if you need to set individual properties on all the components in a document.
If you want to apply a consistent look to all components of a given type, for example to all CheckBoxes or all Buttons in a document, you can set styles at the component level.
The values of style properties set on containers are inherited by contained components.
Flash does not display changes made to style properties when you view components on the Stage using the Live Preview feature.
|
|
|
|