Combobox.value - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

Example
The following code restricts the text box of
maximum of six characters:
// Add Items to List.
my_cb.addItem({data:0xFFFFFF, label:"white"});
my_cb.addItem({data:0x000000, label:"black"});
my_cb.editable = true;
// Restrict what can be entered into textfield to only 0-9.
my_cb.restrict = "0-9";
// Limit input to 6 characters.
my_cb.textField.maxChars = 6;

ComboBox.value

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
comboBoxInstance.value
Description
Read-only property; if the combo box is editable,
box is static,
returns the item data.
value
Example
The following example puts the data into the combo box by setting the
property. It then displays the
displays it in the Output panel while the combo box is editable, and then displays
the combo box is not editable.
my_cb.dataProvider = [
{label:"Alaska", data:"AK"},
{label:"California", data:"CA"},
{label:"Washington", data:"WA"}];
my_cb.editable = true;
my_cb.selectedIndex = 1;
trace('Editable value is "California": ' + my_cb.value);
my_cb.editable = false;
my_cb.selectedIndex = 1;
trace('Non-editable value is "CA": ' + my_cb.value);
206
ComboBox component
myComboBox
in the Output panel. Finally, it selects
value
so that it only accept numbers to
returns the item label. If the combo
value
dataProvider
and
"California"
when
"CA"

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents