Menubar.dataprovider - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

Drag an instance of the MenuBar component onto the Stage, and enter the instance name
in the Property inspector. Add the following code to Frame 1 of the timeline:
my_mb
/**
Requires:
- MenuBar component on Stage (instance name: my_mb)
*/
var my_mb:mx.controls.MenuBar;
var my_menu:mx.controls.Menu = my_mb.addMenuAt(0, "Flash");
my_menu.addMenuItem({label:"About Macromedia Flash",
instanceName:"aboutInst"});
my_menu.addMenuItem({label:"Preferences", instanceName:"PrefInst"});
Usage 2: The following example adds an Edit menu with the menu items Undo, Redo, Cut,
and Copy, which are defined in the XML data provider
first position of the MenuBar instance
Drag an instance of the MenuBar component onto the Stage, and enter the instance name
in the Property inspector. Add the following code to Frame 1 of the timeline:
my_mb
/**
Requires:
- MenuBar component on Stage (instance name: my_mb)
*/
var my_mb:mx.controls.MenuBar;
var myDP_xml:XML = new XML();
myDP_xml.addMenuItem({label:"Undo", instanceName:"undoInst"});
myDP_xml.addMenuItem({label:"Redo", instanceName:"redoInst"});
myDP_xml.addMenuItem({type:"separator"});
myDP_xml.addMenuItem({label:"Cut", instanceName:"cutInst"});
myDP_xml.addMenuItem({label:"Copy", instanceName:"copyInst"});
my_mb.addMenuAt(0, "Edit", myDP_xml);

MenuBar.dataProvider

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
958
MenuBar component (Flash Professional only)
myDP_xml
.
my_mb
. It adds the menu to the

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