MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 941

Components language reference
Table of Contents

Advertisement

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
// root element and give it a convenient name.
var menuDP_obj:Object = my_xml.addMenuItem("XXXXX");
// Add the menu items.
menuDP_obj.addMenuItem({label:"Edit"});
// Create the Menu object.
var my_menu:Menu = Menu.createMenu(this, menuDP_obj);
// Show and position the menu.
my_menu.show(100, 20);
// Add the menu item.
menuDP_obj.addMenuItemAt(1, {label:"Save", instanceName:"saveItem1"});
MenuDataProvider.addMenuItemAt()
937

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