User Guide
Accordion component (Flash Professional only) 105
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);
Note: The code
trace(myAccordionInstance.version); returns undefined.
Method summary for the Accordion class
The following table lists methods of the Accordion class.
Methods inherited from the UIObject class
The following table lists the methods the Accordion class inherits from the UIObject class. When
calling these methods from the Accordion object, use the form
accordionInstance.methodName.
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.
Method Description
UIObject.createClassObject() Creates an object on the specified class.
UIObject.createObject() Creates a subobject on an object.
UIObject.destroyObject() Destroys a component instance.
UIObject.doLater() Calls a function when parameters have been set in the Property and
Component inspectors.