Radiobutton.label - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

// Create listener object.
var rbListener:Object = new Object();
rbListener.click = function(evt_obj:Object){
trace("The selected radio button group name is " +
evt_obj.target.groupName);
}
// Add listener.
myrbGroup.addEventListener("click", rbListener);

RadioButton.label

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
radioButtonInstance.label
Description
Property; specifies the text label for the radio button. By default, the label appears to the right
of the radio button. Calling this method overrides the label parameter specified during
authoring. If the label text is too long to fit within the bounding box of the component, the
text is clipped. You can call
text does not wrap to the next line.
To provide a label with text that wraps, you can combine a RadioButton with no label and a
TextArea to act as a single RadioButton with wrapping text. The following example creates
such a radio button. It assumes that you have a RadioButton component and a TextArea
component in the library and turns off the border for the TextArea. The
would be undefined in this case, if you accessed it.
this.createClassObject(mx.controls.RadioButton, "sameas_rb", 1,
{groupName:"myGroup"});
sameas_rb.move(0,30)
this.createClassObject(mx.controls.TextArea, "message_ta", 2);
message_ta.setSize(200, 60);
// Turn off the border for the TextArea.
message_ta.borderStyle = "none";
message_ta.wordWrap = true;
message_ta.text = "Click here if your shipping information is the same as
your billing information.";
message_ta.move(20, 30);
RadioButton.setSize()
to increase the size of the label area, but
label
RadioButton.label 1039
property

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents