MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 114

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

Advertisement

The default value is
doesn't have children, the default value is
Example
The following example retrieves the label of the selected child view:
var selectedLabel = myAccordion.selectedChild.label;
The following example sets the payment form to be the selected child view:
myAccordion.selectedChild = myAccordion.payment;
See also
Accordion.selectedIndex
Accordion.selectedIndex
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
myAccordion.selectedIndex
Description
Property; the zero-based index of the selected child in an accordion with one or more children.
For an accordion with no child views, the only valid value is
Each accordion child is given an index number for its position. This index number is zero-based,
so the first child is 0, the second child is 1, and so on. The valid values of
1, 2, ... , n - 1, where n is the number of children.
Setting this property to a child causes the accordion to begin the transition animation to display
the specified child.
Changing the value of
Example
The following example remembers the index of the selected child:
var oldSelectedIndex = myAccordion.selectedIndex;
The following example selects the last child:
myAccordion.selectedIndex = myAccordion.numChildren - 1;
See also
Accordion.numChildren
114
Chapter 6: Components Dictionary
myAccordion.getChildAt(0)
undefined
also changes the value of
selectedIndex
,
Accordion.selectedChild
if the accordion has children. If the accordion
.
.
undefined
selectedChild
are 0,
selectedIndex
.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx

Table of Contents