javascript之水平横向滚动歌词同步的应用

2019-06-02 20:35:49于丽

      eval("lrcbc"+(this.dlt+1)).style.width = Math.round(bbw);
    }
  }
  lrcbox1.innerText = "www.aboutplayer.com";
}

function overbottom()
{
  if(aboutplayer.currentMedia.duration>0)
  {
    var ii;
    for(ii=lrcobj.inr.length-1; ii>0 && lrcobj.inr[ii].t[0]-ffbb>=aboutplayer.currentMedia.duration; ii--){}
    bottom = ii;
  }
  else
    setTimeout("overbottom()",10);
}

function jumpto(nline)
{
  lrctop -= 20*nline;
  lrcoll.style.top = lrctop;
}

function toposition(step,dur)
{
  if(moveflag) return;
  lrcoll.style.top = lrctop--;
  if(step<20)
  {
    step++;
    setTimeout("toposition("+step+","+dur+");",dur*50);
  }
}

function highcolor(step,dur)
{
  if(moveflag) return;
  eval("lrcbc"+predlt).filters.alpha.opacity = 100-(step++)*10;
  if(step<10)
    lrc1 = setTimeout("highcolor("+step+","+dur+");",dur*100);
}

function curhighcolor(step,dur)
{
  if(moveflag) return;
  eval("lrcbc"+(curdlt+1)).filters.alpha.opacity = (step++)*10;
  if(step<10)
    lrc2 = setTimeout("curhighcolor("+step+","+dur+");",dur*100);
}

function highlight(lid)
{
  lid.style.color = "#00FF00";
}

function lowcolor(lid)
{
  clearTimeout(lrc1);
  lid.style.width = 0;
  lid.filters.alpha.opacity = 100;
}

function curlowcolor(lid)
{
  lid.filters.alpha.opacity = 0;
  lid.style.width = "100%";
}

function lowlight(lid)
{
  lid.style.color = "#0080C0";
}

function lrcrun(m)
{
  lrcobj = new lrcClass(m);
  lrc0 = setInterval("try {lrcobj.run(aboutplayer.controls.currentPosition+ffbb)} catch(hh){}",10);
}

MakeMovable(lrcollbox);
function MakeMovable(element)
{
  element.attachEvent("onmousedown",onmousedown); 
  element.attachEvent("onmouseup",onmouseup);
  element.attachEvent("onmousemove",onmousemove);
  flagmove = false;
  var s_y, o_y;
  curpot = 0;

  function onmousedown()
  {
    if(event.button!=1 || moveflag || !movable || !type || bottom==0) {flagmove = true; return;}