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]