User Guide
144 Chapter 6: Components Dictionary
Description
Property; specifies the text label for a button instance. By default, the label appears centered on
the button. Calling this method overrides the label authoring parameter specified in the Property
inspector or the Component inspector. The default value is
"Button".
Example
The following code sets the label to “Remove from list”:
buttonInstance.label = "Remove from list";
See also
Button.labelPlacement
Button.labelPlacement
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
buttonInstance.labelPlacement
Description
Property; sets the position of the label in relation to the icon. The default value is "right". The
following are the four possible values; the icon and label are always centered vertically and
horizontally within the bounding area of the button:
• "right" The label is set to the right of the icon.
• "left" The label is set to the left of the icon.
• "bottom" The label is set below the icon.
• "top" The label is set above the icon.
Example
The following code sets the label to the left of the icon. The second line of the code sends the
value of the
labelPlacement property to the Output panel:
iconInstance.labelPlacement = "left";
trace(iconInstance.labelPlacement);