User Guide

About skinning components 97
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 “Editing component skins in a
document” on page 97).
This method of skinning is recommended for beginners, because it doesnt 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 About themes on page 108.)
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 “Linking skin color to styles” on page 100).
To use different skins for multiple instances of the same component, create new skins and
set skin properties. (See “Creating new component skins” on page 99 and “Applying new
skins to a component” on page 101.)
To change skins in a subcomponent (such as a scroll bar in a List component), subclass the
component. (See Applying new skins to a subcomponent” on page 103.)
To change skins of a subcomponent that arent directly accessible from the main
component (such as a List component in a ComboBox component), replace skin
properties in the prototype. (See “Changing skin properties in a subcomponent
on page 106.)
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.
The procedure described below is very similar to creating and applying a new theme (see
About themes” on page 108). The primary difference is that this procedure describes copying
symbols directly from the theme already in use to a single document and editing only a small
number of all skins available. This is appropriate when your modifications are all in a single
document and when you are modifying skins for only a few components. If the edited skins
will be shared in multiple documents or encompass changes in several components, you may
find editing the skins easier if you create a new theme.
An article on advanced skinning can be found online in the Macromedia Developer Center at
www.macromedia.com/devnet/mx/flash/articles/skinning_2004.html.