User Guide

Accordion.createSegment() 55
cardType_label.text = "Card Type";
cardNumber_label.text = "Card Number";
Accordion.createSegment()
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
accordionInstance.createSegment(classOrSymbolName, instanceName[, label[,
icon]])
Parameters
classOrSymbolName Either a reference to the constructor function for the class of the
UIObject to be instantiated, or the linkage name of the symbol to be instantiated. The class
must be UIObject or a subclass of UIObject, but most often it is View or a subclass of View.
instanceName The instance name of the new instance.
label A string that specifies the text label that the new child instance uses on its header.
This parameter is optional.
icon A string reference to the linkage identifier of the library symbol that the child uses for
the icon on its header. This parameter is optional.
Returns
A reference to the newly created UIObject instance.
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
classOrSymbolName parameter. You can use the label and icon parameters to specify a text
label and an icon for the associated accordion header for each child.
The
createSegment() method differs from the createChild() method in that label and
icon are passed directly as parameters, not as properties of an initalProperties parameter.
When each child is created, it is assigned an index number in the order of creation, and the
numChildren property is increased by 1.