MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 109

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

Advertisement

Example
In the following example, a handler called
myAccordion.addEventListener()
captured by the
broadcast, a
trace
myAccordionListener = new Object();
myAccordionListener.change = function(){
trace("Changed to different view");
}
myAccordion.addEventListener("change", myAccordionListener);
Accordion.createChild()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
myAccordion.createChild(classOrSymbolName, instanceName[, initialProperties])
Parameters
classOrSymbolName
instantiated, or the linkage name (a reference to the symbol to be instantiated). The class must be
UIObject or a subclass of UIObject, but most often it is View object or a subclass of View.
instanceName
initialProperties
instance. You can use the following properties:
A string that specifies the text label that the new child instance uses on its header.
label
A string that specifies the linkage identifier of the library symbol that the child uses for
icon
the icon on its header.
Returns
A reference to an instance of the UIObject that is the newly created child.
Description
Method (inherited from View); 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
and an icon for the associated accordion header for each child in the
parameter.
When each child is created, it is assigned an index number in the order of creation and the
property is increased by 1.
numChildren
handler in the
change
statement is sent to the Output panel.
Either the constructor function for the class of the UIObject to be
The instance name of the new instance.
An optional parameter that specifies initial properties for the new
parameter. You can use the
myAccordionListener
method as the second parameter. The event object is
parameter. When the
eventObject
and
label
Accordion component (Flash Professional only)
is defined and passed to the
change
properties to specify a text label
icon
initialProperties
event is
109

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents