Hello all! I'm fairly new to Actionscript 3 (slowly migrating from AS2) and I've encountered a slight problem while dealing with the SoundChannel object. I'm pretty sure there's a simple solution, but I just haven't seem to reach it yet.

I am currently trying to create a simply mp3 player that will play, pause, and change tracks when selected. I have finally managed to get the Tracks selection working properly, however there seems to be a problem when I pause a song and then press play again. Once I've changed a track and then pause it and play it again, the previous track begins to play right along with the current track. I'm certain it has to do with the sounds loading on the same channel, but I just can't figure out how to fix it.

Any help would be appreciated! Thanks in advance.

(P.S. Please excuse the messy code)

Code:
//Playist
//var playList:String = stage.loaderInfo.parameters.playlist;
var playList:String = 'playlists/projects.xml';	//Testing
var plLoader:URLLoader = new URLLoader();
var playerList:XML;

var tracks:Array = new Array();	//Tracks list

plLoader.load(new URLRequest(playList)); 	//Load Playlist
plLoader.addEventListener(Event.COMPLETE, xmlLoad);
//Load XML
function xmlLoad(event:Event):void
{
	playerList = new XML(event.target.data);
	var sinfo:XMLList = playerList.elements('*').song;
	for(var i:uint = 0; i < sinfo.length(); i++)
	{
		tracks[i] = new Array();
		tracks[i]['title'] = sinfo.title.text()[i];
		tracks[i]['artist'] = sinfo.artist.text()[i];
		tracks[i]['album'] = sinfo.album.text()[i];
		tracks[i]['url'] = sinfo.url.text()[i];
	}
	//Play first song
	playTracks(tracks[0]);
	//List tracks
	playLister(tracks);
}
//Display List
function playLister(trk:Array):void
{
	var yPlacer:uint = 120;
	var trackMovie:Array = new Array();
	
	//List tracks
	var st = 0;
	for(var i:uint = 0; i < trk.length; i++)
	{
		if(i > 0)
		{
			yPlacer += 10;
		}
		
		//Create Movie holder
		var tmp:MovieClip = new MovieClip();
		tmp.name = new String(i);
		trackMovie.push(tmp);
		Player.addChild(tmp);
		tmp.x = 8;
		tmp.y = yPlacer;
		
		var playlist:TextField = new TextField();
		playlist.width = stage.width - 8;
		playlist.height = 45;
		tmp.addChild(playlist);
		playlist.selectable = false;
		playlist.text = trk[i]['title']+' - ';
		playlist.appendText(trk[i]['album']+'\n');
		playlist.appendText(trk[i]['artist']);
		//Text Format
		var pltxtFormat:TextFormat = new TextFormat();
		pltxtFormat.font = 'Helvetica LT';
		pltxtFormat.color = '0x005D00';
		pltxtFormat.leading = 2;
		playlist.setTextFormat(pltxtFormat);		
		//Place divider
		yPlacer += playlist.height + 4;
		var dLine:divider = new divider();
		dLine.name = 'dividers'+i;
		dLine.x = 2.8;
		dLine.y = yPlacer;
		Player.addChild(dLine);
		
		playlist.addEventListener(MouseEvent.CLICK, function(event:Event):void{ changer(event.target.parent.name); });
	}
	//Track Change
	function changer(t):void
	{
		playTracks(trk[t]);
	}
	
}
//Play tracks
function playTracks(trk:Array):void
{	
	//Clear channel
	SoundMixer.stopAll();
	var nplyChannel:SoundChannel = new SoundChannel();
	var nowPlaying:Sound = new Sound();
	var plying = false;
	
	//TextFormats
	var titleFormat:TextFormat = new TextFormat();
	titleFormat.font = 'Helvetica LT';
	titleFormat.color = '0x005D00';
	titleFormat.bold = true;
	titleFormat.size = 14;
	var albumFormat:TextFormat = new TextFormat();
	albumFormat.font = 'Helvetica LT';
	albumFormat.color = '0x005D00';
	albumFormat.size = 11;
	
	Player.title.text = trk['title'];
	Player.title.setTextFormat(titleFormat);
	Player.album.text = 'Buffering...';
	Player.artist.text = '';
	Player.album.setTextFormat(albumFormat);
	Player.artist.setTextFormat(albumFormat);
	
	nowPlaying.load(new URLRequest(trk['url']));
	nowPlaying.addEventListener(ProgressEvent.PROGRESS, buffer);
	nowPlaying.addEventListener(Event.COMPLETE, playSong);
	//Check buffering
	function buffer(event:ProgressEvent):void
	{
		var totalLoad:int = nowPlaying.bytesTotal;
		var totalLoaded:int = nowPlaying.bytesLoaded;
		var prgress:int = (totalLoaded/totalLoad) * 100;
		Player.album.text = 'Buffering...  '+prgress+'%';
	}
	//Play when loaded
	function playSong():void
	{	
		Player.album.text = 'Album: '+trk['album'];
		Player.artist.text = 'Artist: '+trk['artist'];
		nplyChannel = nowPlaying.play();
		plying = true;
		var sndPos:Number = 0;
		//Pause
		Player.pausebttn.addEventListener(MouseEvent.CLICK, pauser);
		function pauser(event:Event):void
		{
			sndPos = nplyChannel.position;
			SoundMixer.stopAll();
			plying = false;
		}
		//Play
		Player.playbttn.addEventListener(MouseEvent.CLICK, playAgain);
		function playAgain(event:Event):void
		{
			if(plying == false)
			{
				nplyChannel = nowPlaying.play(sndPos);
				plying = true;
			}
		}
	}
}