User Guide
Accordion class (Flash Professional only) 47
Accordion class (Flash Professional only)
Inheritance MovieClip > UIObject class > UIComponent class > View > Accordion
ActionScript Class Name mx.containers.Accordion
An Accordion component contains children that are displayed one at a time. Each child has a
corresponding header button that is created when the child is created. A child must be an
instance of UIObject.
A movie clip symbol automatically becomes an instance of the UIObject class when it
becomes a child of an accordion. However, to maintain tabbing order in an accordion’s
children, the children must also be instances of the View class. If you use a movie clip symbol
as a child, set its AS 2.0 Class field to mx.core.View so that it inherits from the View class.
Setting a property of the Accordion class with ActionScript overrides the parameter of the
same name set in the Property inspector or Component inspector.
Each component class has a
version property that is a class property. Class properties are
available only on the class itself. The
version property returns a string that indicates the
version of the component. To access this property, use the following code:
trace(mx.containers.Accordion.version);
Method summary for the Accordion class
The following table lists methods of the Accordion class.
NOTE
The code trace(my_accInstance.version); returns undefined.
Method Description
Accordion.createChild() Creates a child for an Accordion instance.
Accordion.createSegment() Creates a child for an Accordion instance. The parameters
for this method are different from those of the
createChild()
method.
Accordion.destroyChildAt() Destroys a child at a specified index position.
Accordion.getChildAt() Gets a reference to a child at a specified index position.
Accordion.getHeaderAt() Gets a reference to a header object at a specified index
position.