User Guide
142 CheckBox component
The following code sends a message to the Output panel when checkBoxInstance is clicked.
The
on() handler must be attached directly to checkBoxInstance:
on (click) {
trace("check box component was clicked");
}
See also
EventDispatcher.addEventListener()
CheckBox.label
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
checkBoxInstance.label
Description
Property; indicates the text label for the check box. By default, the label appears to the right
of the check box. Setting this property overrides the label parameter specified in the
Parameters tab of the Component inspector.
The CheckBox component does not allow multiline labels.
Example
The following code sets the text that appears beside the CheckBox component and sends the
value to the Output panel:
checkBox.label = "Remove from list";
trace(checkBox.label)