# Combobox music

**URL:** <https://forum.kirupa.com/t/combobox-music/219517>\
**Category:** Uncategorized\
**Created:** [March 17, 2007, 11:03am UTC](https://forum.kirupa.com/t/combobox-music/219517 "2007-03-17T11:03:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mario\_hater](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@mario\_hater](https://forum.kirupa.com/u/mario_hater)\
**Post date:** [March 17, 2007, 11:03am UTC](https://forum.kirupa.com/t/combobox-music/219517/1 "2007-03-17T11:03:44Z")

</div>

I have made a combobox and i am trying to make it so that when i press a button, the song that is selected plays. I have this code already but it doesn’t work, does anyone know how to fix it?

```
ActionScript Code:
[FONT=Courier New][LEFT]song1 = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000FF]Sound[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];

```

song1.[COLOR=#0000FF]attachSound[/COLOR]COLOR=#000000[/COLOR];  
song2 = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000FF]Sound[/COLOR]COLOR=#000000[/COLOR];  
song2.[COLOR=#0000FF]attachSound[/COLOR]COLOR=#000000[/COLOR];  
song = song1;  
play\_btn.[COLOR=#0000FF]onRelease[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
song = songlist\_cb.[COLOR=#000080]value[/COLOR];  
song.[COLOR=#0000FF]start[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#000000]}[/COLOR];  
[/LEFT]  
[/FONT]
