User Guide

Menu component (Flash Professional only) 569
Method summary for the MenuDataProvider class
The following table lists the methods of the MenuDataProvider class.
MenuDataProvider.addMenuItem()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
Usage 1:
myMenuDataProvider.addMenuItem(initObject)
Usage 2:
myMenuDataProvider.addMenuItem(childMenuItem)
Parameters
initObject
An object containing the attributes that initialize a Menu items attributes. For
more information, see About menu item XML attributes” on page 541.
childMenuItem An XML node.
Returns
A reference to an XMLNode object.
Description
Method; Usage 1 adds a child item to the end of a parent menu item (which could be the menu
itself). The menu item is constructed from the values passed in the
initObject parameter.
Usage 2 adds a child item that is defined in the specified XML
childMenuItem parameter to the
end of a parent menu item.
Any node or menu item in a MenuDataProvider instance can call the methods of the
MenuDataProvider class.
Method Description
MenuDataProvider.addMenuItem() Adds a child item.
MenuDataProvider.addMenuItemAt() Adds a child item at a specified location.
MenuDataProvider.getMenuItemAt() Gets a reference to a menu item at a specified location.
MenuDataProvider.indexOf() Returns the index of a specified menu item.
MenuDataProvider.removeMenuItem() Removes a menu item.
MenuDataProvider.removeMenuItemAt() Removes a menu item at a specified location.