# Is combobox the hell it seems?

**URL:** <https://forum.kirupa.com/t/is-combobox-the-hell-it-seems/63145>\
**Category:** flash\
**Created:** [September 3, 2004, 8:45am UTC](https://forum.kirupa.com/t/is-combobox-the-hell-it-seems/63145 "2004-09-03T08:45:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abm](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@abm](https://forum.kirupa.com/u/abm)\
**Post date:** [September 3, 2004, 8:45am UTC](https://forum.kirupa.com/t/is-combobox-the-hell-it-seems/63145/1 "2004-09-03T08:45:30Z")

</div>

It must be…

I’m trying to use a variable and make it assume a diferent value acording to the option selected on the combobox and it’s been hell for me.

Supose I have a variable named “favouritesport”…  
I would like to have a combobox with 3 items (baseball, football, basketball).  
As you choose one of the sports the variable should change.

Ex. If someone chose baseball than it woul make favouritesport=baseball

Can anyone help?

Thanks in advance…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 5, 2004, 12:31am UTC](https://forum.kirupa.com/t/is-combobox-the-hell-it-seems/63145/2 "2004-09-05T00:31:57Z")

</div>

have you tried setting a change handler (see the properties dialog box) to a function (eg. _Fset_) and in that function setting your var to the combobox’s value?:

```auto
function Fset(){
    myVar= myCombobox.getSelectedValue()
}

```

changing myVar and myCombobox to the appropriate instance names…

note im not on a computer with flash so i cant check that but see the left hand pane of the actionscript dialog box under something like Flash UI\>ComboBox\>properties/methods

Prophet.
