Description
Method; creates a child for the accordion. The newly created child is added to the end of the list
of children owned by the accordion. Use this method to place views inside the accordion. The
created child is an instance of the class or movie clip symbol specified in the
parameter. You can use the
associated accordion header for each child.
The
createSegment()
are passed directly as parameters, not as properties of an
When each child is created, it is assigned an index number in the order of creation, and the
property is increased by 1.
numChildren
Example
The following example creates an instance of the
as the last child of
payment
var child = myAccordion.createSegment("PaymentForm", "payment", "Payment",
"payIcon");
child.cardType.text = "Visa";
child.cardNumber.text = "1234567887654321";
The following code creates a child that is an instance of the View class:
var child = myAccordion.createSegment(mx.core.View, "payment", {label:
"Payment", Icon: "payIcon"});
child.cardType.text = "Visa";
child.cardNumber.text = "1234567887654321";
The following code also creates a child that is an instance of the View class, but it uses
reference the constructor for the View class:
import mx.core.View
var child = myAccordion.createSegment(View, "payment", {label: "Payment",
Icon: "payIcon"});
child.cardType.text = "Visa";
child.cardNumber.text = "1234567887654321";
Accordion.destroyChildAt()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
myAccordion.destroyChildAt(index)
Parameters
The index number of the accordion child to destroy. Each child of an accordion is
index
assigned a zero-based index number in the order in which it was created.
and
parameters to specify a text label and an icon for the
label
icon
method differs from the
:
myAccordion
method in that
createChild()
initalProperties
movie clip symbol named
PaymentForm
Accordion component (Flash Professional only)
classOrSymbolName
and
label
icon
parameter.
to
import
111
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers