clear();
lineStyle(0, 0, 100);
beginFill(c, 100);
drawRect(0, 0, __width, __height);
endFill();
}
// required for skins
static function classConstruct():Boolean
{
UIObjectExtensions.Extensions();
_global.skinRegistry["AccordionHeaderSkin"] = true;
return true;
}
static var classConstructed:Boolean = classConstruct();
static var UIObjectExtensionsDependency = UIObjectExtensions;
}
This class creates a square box based on the border style: a blue box for the false up, rollover,
and disabled states; a green box for the normal pressed state; and a red box for the expanded
child.
Save the file.
3.
Create a new FLA file.
4.
Save the FLA file in the same folder as the AS file.
5.
Create a new symbol by selecting Insert > New Symbol.
6.
Set the name to
7.
AccordionHeaderSkin
If the advanced view is not displayed, click the Advanced button.
8.
Select Export for ActionScript.
9.
The identifier will be automatically filled out with
Set the AS 2.0 class to
10.
Ensure that Export in First Frame is already selected, and click OK.
11.
Drag an Accordion component to the Stage.
12.
Set the Accordion properties so that they display several children.
13.
For example, set the
array of
[one,two,three]
Select Control > Test Movie.
14.
Using movie clips to customize the Accordion header skin
The above example demonstrates how to use an ActionScript class to customize the Accordion
header skin, which is the method used by the skins provided in both the Halo and Sample
themes. However, because the example uses simple colored boxes, it is simpler in this case to use
different movie clip symbols as header skins.
.
RedGreenBlueHeader
to an array of
childLabels
.
AccordionHeaderSkin
.
[One,Two,Three]
Accordion component (Flash Professional only)
.
and
to an
childNames
103
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?