// Load the SWFSound Flash Engine
swfsound.embedSWF( 'script/swfsound/swfsound/swfsound.swf' );

var id_sound4;

function updPlayPosition()
{
			var obj = document.getElementById('playpos');
			obj.innerHTML = swfsound.getPosition( id_sound4 );

			var obj = document.getElementById('duration');
			obj.innerHTML = swfsound.getDuration( id_sound4 );
}

function onID3Event()
{
			var id3obj = swfsound.getID3(id_sound4);
			var str = '';

			for ( j in id3obj )
			{
					str += j + ": " + id3obj[j] + "<br />";
			}

			document.getElement('id3info').innerHTML = str;
}

function streamingExample( filename )
{
			swfsound.stopSound( id_sound4 );

		 	id_sound4 = swfsound.loadSound( 
				filename, 
				streamAndAutoPlay = true, 
				onLoadCallback = null, 
				"onID3Event" 
			);
		 	swfsound.setPan( id_sound4, 0 /* 0 = center, -100 = left, +100 = right */ );
		 	swfsound.setVolume( id_sound4, 90 /* 0 = silence, 100 = maximum */ );

		 	setInterval( "updPlayPosition()", 10 );
}

function streamingExamplePause()
{
			swfsound.pauseSound( id_sound4 );
}

function streamVolume( val )
{
			swfsound.setVolume( id_sound4, val );
}

function streamPan( val )
{
			swfsound.setPan( id_sound4, val );
}

function streamingExampleStop()
{
			swfsound.stopSound( id_sound4 );
}


