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

Components language reference
Table of Contents

Advertisement

// root element and give it a convenient name.
var menuDP_obj:Object = my_xml.addMenuItem("XXXXX");
// Add the menu items.
menuDP_obj.addMenuItem({label:"1st Item"});
var menuItem_obj:Object = menuDP_obj.getMenuItemAt(0);
menuItem_obj.addMenuItem({label:"Submenu Item"});
menuDP_obj.addMenuItem({label:"2nd Item"});
// Create the Menu object.
var my_menu:Menu = Menu.createMenu(this, menuDP_obj);
// Show and position the menus.
my_menu.show(100, 20);
// Retrieve the submenu item from the 1st menu item.
var myMenuItem_obj:Object = menuDP_obj.firstChild;
trace(myMenuItem_obj.getMenuItemAt(0));

MenuDataProvider.indexOf()

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
myMenuDataProvider.indexOf(item)
Parameters
A reference to the XML node that describes the menu item.
item
Returns
The index of the specified menu item; returns
if the item does not belong to
undefined
this menu.
Description
Method; returns the index of the specified menu item in this parent menu item.
Any node or menu item in a MenuDataProvider instance can call the methods of the
MenuDataProvider class.
MenuDataProvider.indexOf()
939

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

This manual is also suitable for:

Flash 8

Table of Contents