EasyManua.ls Logo

MACROMEDIA FLASH 8-USING FLASH - Page 637

MACROMEDIA FLASH 8-USING FLASH
678 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
<menulist> 637
Parent tag
<dialog>, <hbox>, <row>, <vbox>
Description
Control tag; creates a pop-up menu control that contains <menupop> and <menuitem> tags.
Example
The following example uses the JavaScript API to create a new Convert to Symbol
command that appears on the Commands menu. This command is a simple version of the
Convert to Symbol dialog box that is on the Modify menu. Create two files, as described in
this section, and place them in your Commands folder in your user-level configuration folder.
For more information, see “Configuration folders installed with Flash” in Getting Started with
Flash.
First, create a file named Convert to Symbol.jsfl and place it in your Commands folder. Place
the following code into the file and save the file:
// Create an XML to UI dialog box using the XML definition in the
// Convert to Symbol.xml file
var convertToSymbolDlg = fl.getDocumentDOM().xmlPanel( fl.configURI +
"Commands/Convert to Symbol.xml" );
if (convertToSymbolDlg.dismiss == "accept") {
var type = new String(convertToSymbolDlg.type);
fl.getDocumentDOM().convertToSymbol(type.toLowerCase(),
convertToSymbolDlg.name, convertToSymbolDlg.registration);
}

Table of Contents

Related product manuals