aboutplayer
<script>
function playList_dragOver(){
event.returnValue=false;
}
function playList_dragEnter(){
event.returnValue=false;
event.dataTransfer.dropEffect='link';
}
function addMusic(){
if(event.srcElement.tagName=='A'){
strTxt=event.srcElement.innerText;
strURL=event.srcElement.href;
playList.innerHTML="";
playList.options[0]=new Option(strTxt,strURL);
playList.options[0].selected=true;
}
event.returnValue=false;
playList_dblClick();
return(false);
}
function playList_drop(){
strTxt=unescape(event.dataTransfer.getData('Text').split(":")[0]);
strURL=unescape(event.dataTransfer.getData('Text').split(":")[1]);
playList.options[playList.options.length]=new Option(strTxt,strURL);
}
function playList_keyDown(){
if(event.keyCode==46){
try{
playList.options[playList.options.selectedIndex].outerHTML="";
}catch(e){}
return(false);
}
if(event.keyCode==13){
playList_dblClick();
return(false);
}
}
function playList_dblClick(){
MediaPlayer1.detachEvent("PlayStateChange",checkPlayStatus);
MediaPlayer1.fileName=playList.value;
MediaPlayer1.play();
setTimeout('MediaPlayer1.play();MediaPlayer1.attachEvent("PlayStateChange",checkPlayStatus);',1000);
}
function musicList_dragStart(){
if(event.srcElement.tagName=='A'){
event.dataTransfer.setData('Text',escape(event.srcElement.innerText)+":"+escape(event.srcElement.href));
}else{
return(false);
}
}
function init(){
MediaPlayer1.AutoRewind=false;
MediaPlayer1.AutoStart=true;
MediaPlayer1.SendPlayStateChangeEvents=true;
MediaPlayer1.attachEvent("PlayStateChange",checkPlayStatus);
}
function checkPlayStatus(oldState,newState){
try{
if(MediaPlayer1.PlayState==0){
MediaPlayer1.detachEvent("PlayStateChange",checkPlayStatus);
MediaPlayer1.stop();
if(playList.options.selectedIndex<body onload="init();">
<table id=table01>
<tr>
<td>
</td>
<td>
Play List:
<select id=playList size=2 ondragover="playList_dragOver();" ondragenter="playList_dragEnter();"
ondrop="playList_drop();" onkeydown="playList_keyDown();" ondblclick="playList_dblClick();">
</select>
</td>
</tr>
</table>
<script language="JavaScript1.2">
var dragswitch=0
var nsx
var nsy
var nstemp
function drag_dropns(name){
temp=eval(name)
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
temp.onmousedown=gons
temp.onmousemove=dragns
temp.onmouseup=stopns
}
function gons(e){
temp.captureEvents(Event.MOUSEMOVE)
nsx=e.x
nsy=e.y
}
function dragns(e){
if (dragswitch==1){
temp.moveBy(e.x-nsx,e.y-nsy)
return false
}
}
function stopns(){
temp.releaseEvents(Event.MOUSEMOVE)
}
//drag drop function for IE 4+////
/////////////////////////////////
var dragapproved=false
function drag_dropie(){
if (dragapproved==true){
document.all.showimage.style.pixelLeft=tempx+event.clientX-iex
document.all.showimage.style.pixelTop=tempy+event.clientY-iey
return false
}
}
function initializedragie(){
iex=event.clientX
iey=event.clientY
tempx=showimage.style.pixelLeft
tempy=showimage.style.pixelTop
dragapproved=true
document.onmousemove=drag_dropie
}
if (document.all){
document.onmouseup=new Function("dragapproved=false")
}
////drag drop functions end here//////
function hidebox(){
if (document.all)
showimage.style.visibility="hidden"
else if (document.layers)
document.showimage.visibility="hide"
}
</script>