Creating a menu with the MenuBuilder framework

Adobe AIR 1.0 and later

The MenuBuilder framework allows you to define the structure of a menu using XML or JSON. The framework includes methods for loading and parsing the file containing the menu structure. Once a menu structure is loaded, additional methods allow you to designate how the menu is used in the application. The methods allow you to set the menu as the Mac OS X application menu, as a window menu, or as a context menu.

The MenuBuilder framework is not built in to the runtime. To use the framework, include the AIRMenuBuilder.js file (included with the Adobe AIR SDK) in your application code, as shown here:

<script type="text/javascript" src="AIRMenuBuilder.js"></script>

The MenuBuilder framework is designed to run in the application sandbox. The framework methods can’t be called from the classic sandbox.

All the framework methods that are for developer use are defined as class methods on the air.ui.Menu class.

// Ethnio survey code removed