# Action Based On Combobox

**URL:** <https://forum.kirupa.com/t/action-based-on-combobox/317561>\
**Category:** flash\
**Created:** [December 24, 2010, 2:03pm UTC](https://forum.kirupa.com/t/action-based-on-combobox/317561 "2010-12-24T14:03:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fotofx](https://avatars.discourse-cdn.com/v4/letter/f/f08c70/32.png) [@fotofx](https://forum.kirupa.com/u/fotofx)\
**Post date:** [December 24, 2010, 2:03pm UTC](https://forum.kirupa.com/t/action-based-on-combobox/317561/1 "2010-12-24T14:03:00Z")

</div>

I am trying to get a button to take an action based on the selected value in a combobox. I have a movieclip named sound\_mc that has named keyframes. I have a combobox named arrival that has values that match the named keyframes in sound\_mc. Does this make sense? It is not working… Am I missing something obvious?

```php
on (press) {
	switch (arrival.value) {

case XXX:
sound_mc.gotoAndStop(arrival.value);

break;

case ATL:
sound_mc.gotoAndStop(arrival.value);

break;
}
}

```

Thanks
