User Guide
MenuBar.addMenuAt() 957
MenuBar.addMenuAt()
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
Usage 1:
menuBarInstance.addMenuAt(index, label)
Usage 2:
menuBarInstance.addMenuAt(index, label, menuDataProvider)
Parameters
index An integer indicating the position where the menu should be inserted. The first
position is 0. To append to the end of the menu, call
MenuBar.addMenu(label).
label A string indicating the label of the new menu.
menuDataProvider An XML or XMLNode instance that describes the menu. If the value is
an XML instance, the instance’s first child is used.
Returns
A reference to the new Menu object.
Description
Method; Usage 1 adds a single menu and menu activator at the specified index with the
specified label. Usage 2 adds a single menu and a labeled menu activator at the specified
index. The content for the menu is defined in the
menuDataProvider parameter.
Example
Usage 1: The following example places a menu in the first position on the MenuBar instance
my_mb.