Menudataprovider.getmenuitemat() - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

MenuDataProvider.getMenuItemAt()

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
myMenuDataProvider.getMenuItemAt(index)
Parameters
An integer indicating the position of the menu.
index
Returns
A reference to the specified XML node.
Description
Method; returns a reference to the specified child menu item of the current menu item.
Any node or menu item in a MenuDataProvider instance can call the methods of the
MenuDataProvider class.
Example
The following example creates a menu, adds a menu item to it, and then calls the
method to access its node object for the purpose of adding a submenu
getMenuItemAt()
item to it. It also calls the
method to display the label of the submenu item
getMenuItemAt()
in the Output panel.
You first drag a Menu component to the library and then add the following code to Frame 1:
/**
Requires:
- Menu component in library
*/
import mx.controls.Menu;
// Create an XML object to act as a factory.
var my_xml:XML = new XML();
// The item created next does not appear in the menu.
// The createMenu() method call (below) expects to
// receive a root element whose children will become
// the items. This is just a simple way to create that
938
Menu component (Flash Professional only)

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents