MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 570

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

Example
The following example adds a new node to a specified node in the menu:
var item0 = myMenuDP.getMenuItemAt(0);
item0.addMenuItem("Inbox", { label:"Item 1", icon:"radioItemIcon",
type:"radio", selected:false, enabled:true, instanceName:"radioItem1",
groupName:"myRadioGroup" } );
MenuDataProvider.addMenuItemAt()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
Usage 1:
myMenuDataProvider.addMenuItemAt(index, initObject)
Usage 2:
myMenuDataProvider.addMenuItemAt(index, childMenuItem)
Parameters
An integer.
index
An object containing the specific attributes that initialize a Menu item's attributes.
initObject
For more information, see
childMenuItem
Returns
A reference to the added XML node.
Description
Method; Usage 1 adds a child item at the specified index position in the parent menu item (which
could be the menu itself ). The menu item is constructed from the values passed in the
parameter. Usage 2 adds a child item that is defined in the specified XML
initObject
childMenuItem
Any node or menu item in a MenuDataProvider instance can call the methods of the
MenuDataProvider class.
Example
Usage 1: The following example adds a new node as the second child of the root of the menu:
myMenuDataProvider.addMenuItemAt(1, {label:"Item 1", type:"radio",
selected:false, enabled:true, instanceName:"radioItem1",
groupName:"myRadioGroup"});
570
Chapter 6: Components Dictionary
"About menu item XML attributes" on page
An XML node.
parameter to the specified index of a parent menu item.
541.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents