User Guide
Menu component (Flash Professional only) 559
Description
Property; the data source for items in a Menu component.
Menu.dataProvider is an XML node object. Setting this property replaces the existing data
source of the menu.
The default value is
undefined.
Note: All XML or XMLNode instances are automatically given the methods and properties of the
MenuDataProvider class when they are used with the Menu component.
Example
The following example imports an XML file and assigns it to the Menu.dataProvider property:
var myMenuDP = new XML();
myMenuDP.load("http://myServer.myDomain.com/source.xml");
myMenuDP.onLoad = function(){
myMenuControl.dataProvider = myMenuDP;
}
Menu.getMenuItemAt()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
myMenu.getMenuItemAt(index)
Parameters
index
An integer indicating the index of the node in the menu.
Returns
A reference to the specified node.
Description
Method; returns a reference to the specified child node of the menu.
Example
The following example gets a reference to the second child node in myMenu and copies the value
into the variable
myItem:
var myItem = myMenu.getMenuItemAt(1);