MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 556

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

Advertisement

Parameters
An integer indicating the index position (among the child nodes) at which the item is
index
added.
An object containing properties that initialize a menu item's attributes. See
initObject
menu item XML attributes" on page
childMenuItem
Returns
A reference to the added XML node.
Description
Method; Usage 1 adds a menu item (child node) at the specified location in the menu. The menu
item is constructed from the values supplied in the
item that is a prebuilt XML node (in the form of an XML object) at a specified location in the
menu. Adding a preexisting node removes the node from its previous location.
Example
Usage 1: The following example adds a new node as the second child of the root of the menu:
myMenu.addMenuItemAt(1, {label:"Item 1", instanceName:"radioItem1",
type:"radio", selected:false, enabled:true, groupName:"myRadioGroup"});
Usage 2: The following example moves a node from one menu to the fourth child of the root of
another menu:
myMenu.addMenuItemAt(3, mySecondMenu.getMenuItemAt(3));
Menu.change
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
listenerObject = new Object();
listenerObject.change = function(eventObject){
// insert your code here
}
myMenu.addEventListener("change", listenerObject)
Description
Event; broadcast to all registered listeners whenever a user causes a change in the menu.
Version 2 components use a dispatcher-listener event model. When a Menu component
broadcasts a
change
attached to a listener object (
addEventListener()
556
Chapter 6: Components Dictionary
541.
An XML node object.
event, the event is handled by a function (also called a handler) that is
listenerObject
method and pass it the name of the handler as a parameter.
parameter. Usage 2 adds a menu
initObject
) that you create. You call the
"About

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?

This manual is also suitable for:

Flash mx

Table of Contents