User Guide
Menu component (Flash Professional only) 541
About menu item XML attributes
The attributes of a menu item
XML element determine what is displayed, how the menu item
behaves, and how it is exposed to ActionScript. The following table describes the attributes of an
XML menu item:
About menu item types (Flash Professional only)
There are four kinds of menu items, specified by the
type attribute:
<menu>
<menuitem label="Normal Item" />
<menuitem type="separator" />
<menuitem label="Checkbox Item" type="check" instanceName="check_1"/>
<menuitem label="RadioButton Item" type="radio" groupName="radioGroup_1" /
>
</menu>
Attribute
name
Type Default Description
label
String
undefined
The text that is displayed to represent a menu item.
This attribute is required for all item types, except
separator.
type
separator
,
check, radio,
normal, or
undefined
undefined
The type of menu item: separator, check box, radio
button, or normal (a command or submenu
activator). If this attribute does not exist, the default
value is
normal.
icon
String
undefined
The linkage identifier of an image asset. This
attribute is not required and is not available for the
check, radio, or separator type.
instanceName
String
undefined
An identifier that you can use to reference the menu
item instance from the root menu instance. For
example, a menu item named yellow can be
referenced as
myMenu.yellow. This attribute is
not required.
groupName
String
undefined
An identifier that you can use to associate several
radio button items in a radio group, and to expose
the state of a radio group from the root menu
instance. For example, a radio group named colors
can be referenced as
myMenu.colors. This attribute
is required only for the type
radio.
selected
A Boolean value
(
false or true) or
string (
"false"
or
"true")
false
A Boolean or string value indicating whether a
check or radio item is on (true) or off (false). This
attribute is not required.
enabled
A Boolean value
(
false or true) or
string (
"false"
or
"true")
true
A Boolean or string value indicating whether this
menu item can be selected (
true) or not (false).
This attribute is not required.