The AS file that defines each component class contains code that loads specific skins for the
component. Each component skin corresponds to a skin property that is assigned to a skin
symbol's linkage identifier. For example, the pressed (down) state of the down arrow of the
ScrollBar component has the skin property name
downArrowDownName
skin symbol in the theme FLA file. You can edit existing skins and apply them to all components
that use the skin by editing the skin symbol and leaving the existing linkage identifier. You can
create new skins and apply them to specific component instances by setting the skin properties for
a component instance. You do not need to edit the component's AS file to change its skin
properties; you can pass skin property values to the component's constructor function when the
component is created in your document.
The skin properties for each component are listed in each component's entry in the Components
Dictionary. For example, the skin properties for the Button component are located here:
Components Dictionary > Button component > Customizing the Button component > Using
skins with the Button component.
Choose one of the following ways to skin a component according to what you want to do. These
approaches are listed from easiest to most difficult.
•
To change the skins associated with all instances of a particular component in a single
document, copy and modify individual skin elements. (See
document" on page
This method of skinning is recommended for beginners, because it doesn't require
any scripting.
•
To replace all the skins in a document with a new set (with each kind of component sharing
the same appearance), apply a theme. (See
This method of skinning is recommended for applying a consistent look and feel across all
components and across several documents.
•
To link the color of a skin element to a style property, add ActionScript code to the skin to
register it as a colored skin element. (See
•
To use different skins for multiple instances of the same component, create new skins and set
skin properties. (See
a component" on page
•
To change skins in a subcomponent (such as a scroll bar in a List component), subclass the
component. (See
•
To change skins of a subcomponent that aren't directly accessible from the main component
(such as a List component in a ComboBox component), replace skin properties in the
prototype. (See
Editing component skins in a document
To edit the skins associated with all instances of a particular component in a single document,
copy the skin symbols from the theme to the document and edit the graphics as desired.
property is
"ScrollDownArrowDown"
81).
"Creating new component skins" on page 83
85.)
"Applying new skins to a subcomponent" on page
"Changing skin properties in the prototype" on page
downArrowDownName
, which is the linkage identifier of the
"Editing component skins in a
"About themes" on page
"Linking skin color to styles" on page
About skinning components
. The default value of the
77.)
83).
and
"Applying new skins to
86.)
89.)
81
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers