User Guide

108 Button component
You can also create the button and assign the label entirely in ActionScript using the method
UIObject.createClassObject(). First drag the Button component from the Components
panel to the current document’s library, so the component appears in the library, but not on
the Stage. Then, in the first frame of the main timeline, add the following ActionScript:
this.createClassObject(mx.controls.Button, "my_button", 1, {label: "Test
Button"});
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.