Example
The following code gets a reference to the last header of
and displays the label in the
my_acc
Output panel:
import mx.core.View;
// Create child panels for each form to be displayed in my_acc object.
my_acc.createChild(View, "shippingAddress", {label: "Shipping Address"});
my_acc.createChild(View, "billingAddress", {label: "Billing Address"});
my_acc.createChild(View, "payment", {label: "Payment"});
var head3:Object = my_acc.getHeaderAt(2);
trace(head3.label);
Accordion.numChildren
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
accordionInstance.numChildren
Description
Property (inherited from View); indicates the number of children (of type UIObject) in an
Accordion instance. Headers are not counted as children.
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 code
my_acc.numChild -
always refers to the last child added to an accordion. For example, if there were seven
1
children in an accordion, the last child would have the index 6. The
property is
numChildren
not zero-based, so the value of
would be 7. The result of 7 - 1 is 6,
my_acc.numChildren
which is the index number of the last child.
60
Accordion component (Flash Professional only)
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers