MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 916

Components language reference
Table of Contents

Advertisement

Description
Property; the data source for items in a Menu component.
Menu.dataProvider
source of the menu.
The default value is
undefined
All XML or XMLNode instances are automatically given the methods and properties of
the MenuDataProvider class when they are used with the Menu component.
Example
The following example creates a menu (
XML object, and then populates the menu with menu items by assigning child nodes of the
XML object to the
dataProvider
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 the Menu object.
var my_menu:Menu = Menu.createMenu();
var my_xml:XML = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success:Boolean){
if (success) {
my_menu.dataProvider = my_xml.firstChild;
}
}
my_xml.load("http://www.flash-mx.com/mm/xml/menu.xml");
// Show and position the menus.
my_menu.show(100, 20);
912
Menu component (Flash Professional only)
is an XML node object. Setting this property replaces the existing data
.
my_menu
property of the menu (
), loads menu items from a web page into an
my_menu.dataProvider
).

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