User Guide

Button.labelPlacement 109
Example
With a button on the Stage with instance name my_button, and a symbol in the Library panel
with the linkage identifier
happiness, the following code sets the label alignment to the left
of the icon:
my_button.icon = "happiness";
my_button.label = "Test Button";
my_button.labelPlacement = "left";
You can also create the button and set the alignment entirely in ActionScript using the
method
UIObject.createClassObject(). First drag the Button component from the
Components panel to the current document’s library, so it 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", icon: "happiness", labelPlacement: "left"});