Menubar.removeall() - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

MenuBar.removeAll()

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
menuBarInstance.removeAll()
Parameters
None.
Returns
Nothing.
Description
Method; removes all menu items on the menu bar.
Example
The following example creates File, Edit, Tools, and Window menus on the menu bar. Then
when a button is clicked, the script calls
to remove the menu items.
removeAll()
Drag the MenuBar component onto the Stage, and enter the instance name
in the
myMenuBar
Property inspector. Also drag the Button component to the Stage, and enter the instance
name
. Add the following code to Frame 1 of the timeline:
remBtn
var menu = myMenuBar.addMenu("File");
var menu = myMenuBar.addMenu("Edit");
var menu = myMenuBar.addMenu("Tools");
var menu = myMenuBar.addMenu("Window");
// Add a button that removes the menu items.
var rem_listener = new Object();
rem_listener.click = function() {
myMenuBar.removeAll();
};
remBtn.addEventListener("click", rem_listener);
964
MenuBar component (Flash Professional only)

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