Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In this chapter, I described how to use the Flex 4 SDK's new skinning architecture to create and use custom skins for Spark components. You learned the following:
You declare custom skins in Flex 4 as MXML components.
Custom skins for Spark components are subclassed from the new SparkSkin class.
A custom skin can combine vector and bitmap graphics to implement any desired visual design.
The [HostComponent] metadata tag associates a custom skin with its host component
Custom skins must declare the host component's required skin states.
Custom skins can declare objects with the id of a skin part declared by the hostcomponent.
You use the skinClass style to load a skin into a component.
The skinClass style can be set with inline attributes, embedded or external style sheets, or loaded at runtime by using the setStyle() method or the StyleManager class.