Flash CS3 Documentation |
|||
| ActionScript 2.0 Components Language Reference > Accordion component > Accordion class | |||
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.
|
NOTE |
|
The Accordion component is supported only if you are working in an ActionScript 2.0 document. |
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 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 |
The following table lists methods of the Accordion class.
|
Method |
Description |
|---|---|
|
Creates a child for an Accordion instance. |
|
|
Creates a child for an Accordion instance. The parameters for this method are different from those of the |
|
|
Destroys a child at a specified index position. |
|
|
Gets a reference to a child at a specified index position. |
|
|
Gets a reference to a header object at a specified index position. |
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 |
|---|---|
|
Creates an object on the specified class. |
|
|
Creates a subobject on an object. |
|
|
Destroys a component instance. |
|
|
Calls a function when parameters have been set in the Property and Component inspectors. |
|
|
Gets the style property from the style declaration or object. |
|
|
Marks the object so it is redrawn on the next frame interval. |
|
|
Moves the object to the requested position. |
|
|
Forces validation of the object so it is drawn in the current frame. |
|
|
Resizes the object to the requested size. |
|
|
Sets a skin in the object. |
|
|
Sets the style property on the style declaration or object. |
The following table lists the methods the Accordion class inherits from the UIComponent class. When calling these methods from the Accordion object, use the form accordionInstance.methodName.
|
Method |
Description |
|---|---|
|
Returns a reference to the object that has focus. |
|
|
Sets focus to the component instance. |
The following table lists properties of the Accordion class.
|
Property |
Description |
|---|---|
|
The number of children of an Accordion instance. |
|
|
A reference to the selected child. |
|
|
The index position of the selected child. |
The following table lists the properties the Accordion class inherits from the UIObject class. When accessing these properties, use the form accordionInstance.propertyName.
|
Property |
Description |
|---|---|
|
Read-only; the position of the bottom edge of the object, relative to the bottom edge of its parent. |
|
|
Read-only; the height of the object, in pixels. |
|
|
Read-only; the left edge of the object, in pixels. |
|
|
Read-only; the position of the right edge of the object, relative to the right edge of its parent. |
|
|
A number indicating the scaling factor in the x direction of the object, relative to its parent. |
|
|
A number indicating the scaling factor in the y direction of the object, relative to its parent. |
|
|
Read-only; the position of the top edge of the object, relative to its parent. |
|
|
A Boolean value indicating whether the object is visible ( |
|
|
Read-only; the width of the object, in pixels. |
|
|
Read-only; the left edge of the object, in pixels. |
|
|
Read-only; the top edge of the object, in pixels. |
The following table lists the properties the Accordion class inherits from the UIComponent class. When accessing these properties, use the form accordionInstance.propertyName.
|
Property |
Description |
|---|---|
|
Indicates whether the component can receive focus and input. |
|
|
A number indicating the tabbing order for a component in a document. |
The following table lists an event of the Accordion class.
|
Event |
Description |
|---|---|
|
Broadcast to all registered listeners when the |
The following table lists the events the Accordion class inherits from the UIObject class.
|
Event |
Description |
|---|---|
|
Broadcast when an object is about to draw its graphics. |
|
|
Broadcast when an object's state changes from visible to invisible. |
|
|
Broadcast when subobjects are being created. |
|
|
Broadcast when the object has moved. |
|
|
Broadcast when an object has been resized. |
|
|
Broadcast when an object's state changes from invisible to visible. |
|
|
Broadcast when the subobjects are being unloaded. |
The following table lists the events the Accordion class inherits from the UIComponent class.
|
Event |
Description |
|---|---|
|
Broadcast when an object receives focus. |
|
|
Broadcast when an object loses focus. |
|
|
Broadcast when a key is pressed. |
|
|
Broadcast when a key is released. |
Flash CS3