Changing skin properties in the prototype
If a component does not directly support skin variables, you can subclass the component and
replace its skins. For example, the ComboBox component doesn't directly support skinning its
drop-down list, because the ComboBox component uses a List component as its drop-down list.
If a component is composed of subcomponents, the subcomponents are identified in the
component's entry in
To skin a subcomponent:
Follow the steps in
1.
skin. For this example, edit the ScrollDownArrowDown skin and give it the new name
MyScrollDownArrowDown.
Select File > New and create a Flash document.
2.
Select File > Save and give the file a unique name, such as MyComboTest.fla.
3.
Drag MyScrollDownArrowDown from the theme library above to the Stage of
4.
MyComboTest.fla, and delete it.
This adds the symbol to the library, but doesn't make it visible on the Stage.
Select Insert > New Symbol and give the symbol a unique name, such as MyComboBox.
5.
Select the Export for ActionScript check box and click OK.
6.
Export in First Frame is automatically selected.
Enter the following code in the Actions panel on Frame 1 of the MyComboBox symbol:
7.
#initclip 10
import MyComboBox
Object.registerClass("ComboBox", MyComboBox);
#endinitclip
When you finish editing the symbol, click the Back button at the left side of the information
8.
bar at the top of the Stage to return to document-editing mode.
Drag a ComboBox component to the Stage.
9.
In the Property inspector, enter as many Label parameters as necessary for the vertical scroll bar
10.
to appear.
Select File > Save.
11.
Select File > New and create a new ActionScript file.
12.
Chapter 6, "Components Dictionary."
"Editing component skins in a document" on page
81, but edit a scroll bar
About skinning components
89
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