Creating new component skins
If you want to use a particular skin for one instance of a component, but another skin for another
instance of the component, you must open a theme FLA file and create a new skin symbol.
Components are designed to make it easy to use different skins for different instances.
To create a new skin:
Select File > Open and open the theme FLA file that you want to use as a template.
1.
Select File > Save As and select a unique name, such as MyTheme.fla.
2.
Select the skins that you want to edit (in this example, RadioTrueUp).
3.
The skins are located in the Themes/MMDefault/Component Assets folder (in this example,
Themes/MMDefault/RadioButton Assets/States).
Select Duplicate from the Library options menu (or by right-clicking the symbol), and give the
4.
symbol a unique name, such as MyRadioTrueUp.
Click Advanced in the Symbol Properties dialog box, and select Export for ActionScript.
5.
A linkage identifier that matches the symbol name is entered automatically.
Double-click the new skin in the library to open it in symbol-editing mode.
6.
Modify the movie clip, or delete it and create a new one.
7.
You may need to select View > Zoom In to increase the magnification. When you edit a skin,
you must maintain the registration point in order for the skin to be displayed correctly. The
upper left corner of all edited symbols must be at (0,0).
When you finish editing the skin symbol, click the Back button at the left side of the
8.
information bar at the top of the Stage to return to document-editing mode.
Select File > Save but don't close MyTheme.fla. Now you must create a new document in which
9.
to apply the edited skin to a component.
For more information, see
skins to a subcomponent" on page
on page
89.
Note: Flash does not display changes made to component skins when you view components on the
Stage using Live Preview.
Linking skin color to styles
The version 2 component framework makes it easy to link a visual asset in a skin element to a
style set on the component using the skin. To register a movie clip instance to a style, or an entire
skin element to a style, add ActionScript code in the Timeline of the skin to call
mx.skins.ColoredSkinElement.setColorStyle(targetMovieClip, styleName)
"Applying new skins to a component" on page
86, or
"Changing skin properties in the prototype"
85,
"Applying new
.
About skinning components
83
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?