# Can't play more than one sound

**URL:** <https://forum.kirupa.com/t/cant-play-more-than-one-sound/318618>\
**Category:** Uncategorized\
**Created:** [January 25, 2011, 12:38pm UTC](https://forum.kirupa.com/t/cant-play-more-than-one-sound/318618 "2011-01-25T12:38:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxelcat](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/maxelcat/32/2854_2.png) [@maxelcat](https://forum.kirupa.com/u/maxelcat)\
**Post date:** [January 25, 2011, 12:38pm UTC](https://forum.kirupa.com/t/cant-play-more-than-one-sound/318618/1 "2011-01-25T12:38:22Z")

</div>

Hi

I am trying to build a simple xml based mp3 player for a project. I have got as far as combo/list boxes populating.

The first time you click the a track to play it all is well.

However, when you click another track, the first stops, but then I get error message.

Here’s the relevant code:

```auto
var snd:Sound = new Sound();
snd.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false,0,true);
var channel:SoundChannel;
var soundPlaying:Boolean = false;

:
:
function playSong(e:Event):void{
	if (soundPlaying==true){
			channel.stop();
			soundPlaying=false;
		}
	
	var songURL:String = baseURL+album_cmb.selectedItem.label+"/"+songs_list.selectedItem.label;
	snd.load(new URLRequest (songURL));
	channel = snd.play();
	soundPlaying=true;
	
	//trace ("soundPlaying="+soundPlaying);
}

```

I think something might be wrong with the way I am attempting to load in the second sound - but that analysis might be wrong of course!

This is the error:

```auto
Error: Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful.
	at flash.media::Sound/_load()
	at flash.media::Sound/load()
	at MP3s002_fla::MainTimeline/playSong()
	at flash.events::EventDispatcher/dispatchEventFunction()
	at flash.events::EventDispatcher/dispatchEvent()
	at fl.controls::SelectableList/handleCellRendererClick()

```

Any help greatfully received

thanks

E
