MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 104

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

To create movie clip symbols for Accordion header skins:
Create a new FLA file.
1.
Create a new symbol by selecting Insert > New Symbol.
2.
Set the name to
3.
If the advanced view is not displayed, click the Advanced button.
4.
Select Export for ActionScript.
5.
The identifier will be automatically filled out with
Leave the AS 2.0 Class text box blank.
6.
Ensure that Export in First Frame is already selected, and click OK.
7.
Open the new symbol for editing.
8.
Use the drawing tools to create a box with a red fill and black line.
9.
Set the border style to hairline.
10.
Set the box, including the border, so that it is positioned at (0,0) and has a width and height of
11.
100.
The ActionScript code will size the skin as needed.
Repeat steps 2-11 and create green and blue skins, named accordingly.
12.
Click the Back button to return to the main Timeline.
13.
Drag an Accordion component to the stage.
14.
Set the Accordion properties so that they display several children.
15.
For example, set
of
[one,two,three]
Copy the following ActionScript code to the Actions panel with the Accordion instance
16.
selected:
onClipEvent(initialize) {
falseUpSkin = "RedAccordionHeaderSkin";
falseDownSkin = "GreenAccordionHeaderSkin";
falseOverSkin = "RedAccordionHeaderSkin";
falseDisabled = "RedAccordionHeaderSkin";
trueUpSkin = "BlueAccordionHeaderSkin";
trueDownSkin = "BlueAccordionHeaderSkin";
trueOverSkin = "BlueAccordionHeaderSkin";
trueDisabledSkin = "BlueAccordionHeaderSkin";
}
Select Control > Test Movie.
17.
104
Chapter 6: Components Dictionary
RedAccordionHeaderSkin
to an array of
childLabels
.
.
RedAccordionHeaderSkin
and
[One,Two,Three]
.
to an array
childNames

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents