MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 1041

Components language reference
Table of Contents

Advertisement

RadioButton.data
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
radioButtonInstance.data
Description
Property; specifies the data to associate with a RadioButton instance. Setting this property
overrides the data parameter value set during authoring. The
property can be of any
data
data type.
Example
The following example assigns the data value
and the label
to the radio
0xFF00FF
#FF00FF
button instance
. It then creates a listener for a click event and displays the button's data
my_rb
value when a user clicks the button.
You first drag a RadioButton component from the Components panel to the current
document's library, and then add the following code to Frame 1 of the main timeline:
/**
Requires:
- RadioButton component in library
*/
this.createClassObject(mx.controls.RadioButton, "my_rb", 10,
{label:"first", groupName:"radioGroup"});
my_rb.data = 0xFF00FF;
my_rb.label = "#FF00FF";
var rbListener:Object = new Object();
rbListener.click = function(evt_obj:Object){
trace("The data value for my_rb is " + my_rb.data);
}
// Add listener.
my_rb.addEventListener("click", rbListener);
RadioButton.data
1037

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents