查看: 2053|回复: 9

[求助] 歌词移动

[复制链接]

该用户从未签到

鲜花(0) 鸡蛋(0)
发表于 2009-11-8 18:02 | 显示全部楼层 |阅读模式









[ 本帖最后由 无忌未来 于 2009-11-8 18:08 编辑 ]

该用户从未签到

鲜花(0) 鸡蛋(0)
 楼主| 发表于 2009-11-8 18:06 | 显示全部楼层
我就是想问下怎么样才可以把歌词显示的行数少一点,就是说能显示个三四排歌词就够了,请教高手了。。。先谢

该用户从未签到

鲜花(0) 鸡蛋(0)
 楼主| 发表于 2009-11-8 18:07 | 显示全部楼层

<html>
<head>
<title>女人如烟</title>
<STYLE>
TD { FONT-SIZE: 8pt; LINE-HEIGHT: 14px; }
BODY{
FONT-SIZE: 9pt;
LINE-HEIGHT: 16px;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
#lrcollbox td, #lrcollbox font {font-family: 微软雅黑; font-size: 14px;}
#lrcoll td { color:#000000; cursor: default; }
#lrcbox { color:#006000 }
#lrcfilter { filter: alpha(opacity=0) }
#lrcbc { color:#FF0000 }
</STYLE>
</head>
<img src=\"http://bbs.yhlove.com/attachments/month_0910/20091018_2dffdee04c63131b5759YpejbZ58uocs.jpg\">

<div style=\"position: absolute; z-index: 1; left:30px; top:170px\" id=\"layer1\">
<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<span id=\"lrcdata\"><!--

[ti:女人如烟]
[ar:魏佳艺]
[al:女人如烟]
[by:歌手魏佳艺官方网站:中国星空网]
[00:00.63]女人如烟
[00:12.17]词曲:穆真 演唱:魏佳艺
[00:24.58]那天你用柔情将我点燃
[00:30.49]我开始变成你手中的烟
[00:36.48]你轻轻地将我含在唇间
[00:42.48]我的身姿弥漫了你的眼
[00:48.45]你漫不经心燃烧我的生命
[00:54.41]我也心甘情愿做你的烟
[01:00.37]也许你不经意的一个微笑
[01:06.34]我就义无反顾地来到你身边
[01:15.29]你说过 今生与烟为伴
[01:21.29]你说过 女人如烟你已习惯
[01:27.13]你说过 聚散离合随遇而安
[01:33.19]可我来世还要做你手中的烟
[01:39.36]想我了 就请你把我点燃
[01:45.19]任我幸福的泪缠绵你指尖
[01:51.13]化成灰也没有一丝遗憾
[01:57.20]让我今生来世为你陪伴
[02:03.11]间奏 词曲穆真 演唱魏佳艺
[02:26.90]那天你用柔情将我点燃
[02:32.90]我开始变成你手中的烟
[02:38.96]你轻轻地将我含在唇间
[02:44.90]我的身姿弥漫了你的眼
[02:50.89]你漫不经心燃烧我的生命
[02:56.79]我也心甘情愿做你的烟
[03:02.83]也许你不经意的一个微笑
[03:08.90]我就义无反顾地来到你身边
[03:17.71]空气中 寂寞在悄悄蔓延
[03:23.67]就算我化为烟雾也不忍离散
[03:29.58]好喜欢 你疼我说笨蛋噢乖
[03:35.67]我知道 我的感觉无法改变
[03:41.63]想我了 就请你把我点燃
[03:47.59]任我幸福的泪缠绵你指尖
[03:53.51]化成灰也没有一丝遗憾
[03:59.64]让我今生来世为你陪伴
[04:08.45]让我今生来世
[04:14.33]为你陪伴

--></span>
<center>
<OBJECT id=aboutplayer height=0 width=0
classid=clsid:6bf52a52-394a-11d3-b153-00c04f79faa6><ARAM NAME=\"url\" VALUE=\"http://www.mjbox.com/r/hz/hzyh66/MP3/女人如烟 魏佳艺.mp3\"><ARAM NAME=\"autostart\" VALUE=\"5\"><ARAM NAME=\"volume\" VALUE=\"100\"><PARAM NAME=\"enablecontextmenu\" VALUE=\"0\"><PARAM NAME=\"enableerrordialogs\" VALUE=\"0\"><param NAME=\"PlayCount\" VALUE=\"100\"></OBJECT>
</CENTER>
<div id=\"lrcollbox\" style=\"overflow:hidden; height:250; width:350;\" >
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" id=\"lrcoll\" style=\"position:relative; top: -20px;\" oncontextmenu=\"return false;\">
<tr><td nowrap height=\"20\" align=\"center\" id=\"lrcwt1\"></td></tr>
<tr><td nowrap height=\"20\" align=\"center\" id=\"lrcwt2\"></td></tr>
<tr><td nowrap height=\"20\" align=\"center\" id=\"lrcwt3\"></td></tr>
<tr><td nowrap height=\"20\" align=\"center\" id=\"lrcwt4\"></td></tr>
<tr><td nowrap height=\"20\" align=\"center\" id=\"lrcwt5\"></td></tr>
<tr><td nowrap height=\"20\" align=\"center\" id=\"lrcwt6\"></td></tr>
<tr><td nowrap height=\"20\" align=\"center\" id=\"lrcwt7\"></td></tr>
<tr><td nowrap height=\"20\" align=\"center\" id=\"lrcwt8\"></td></tr>
<tr><td nowrap height=\"20\" align=\"center\" id=\"lrcwt9\"></td></tr>
<tr><td nowrap height=\"20\" align=\"center\" id=\"lrcwt10\"></td></tr>
<tr><td nowrap height=\"20\" align=\"center\" id=\"lrcwt11\"></td></tr>
<tr><td nowrap height=\"20\" align=\"center\">
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr><td nowrap height=\"20\"><span id=\"lrcwt12\" style=\"height:20\"></span></td></tr>
<tr style=\"position:relative; top: -20px; z-index:6\"><td nowrap height=\"20\"><div id=\"lrcfilter\" style=\"overflow:hidden; width:100%; color:#FFFF33; height:20\"></div></td></tr>
</table>
</td></tr>
<tr style=\"position:relative; top: -20px\"><td nowrap height=\"20\" align=\"center\">
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr><td nowrap height=\"20\"><span id=\"lrcbox\" style=\"height:20\">歌词加载中</span></td></tr>
<tr style=\"position:relative; top: -20px; z-index:6;\"><td nowrap height=\"20\"><div id=\"lrcbc\" style=\"overflow:hidden; height:20; width:0;\"></div></td></tr>
</table>
</td></tr>
<tr style=\"position:relative; top: -40px;\"><td nowrap height=\"20\" align=\"center\" id=\"lrcwt13\"></td></tr>
<tr style=\"position:relative; top: -40px;\"><td nowrap height=\"20\" align=\"center\" id=\"lrcwt14\"></td></tr>
<tr style=\"position:relative; top: -40px;\"><td nowrap height=\"20\" align=\"center\" id=\"lrcwt15\"></td></tr>
<tr style=\"position:relative; top: -40px;\"><td nowrap height=\"20\" align=\"center\" id=\"lrcwt16\"></td></tr>
<tr style=\"position:relative; top: -40px;\"><td nowrap height=\"20\" align=\"center\" id=\"lrcwt17\"></td></tr>
<tr style=\"position:relative; top: -40px;\"><td nowrap height=\"20\" align=\"center\" id=\"lrcwt18\"></td></tr>
<tr style=\"position:relative; top: -40px;\"><td nowrap height=\"20\" align=\"center\" id=\"lrcwt19\"></td></tr>
<tr style=\"position:relative; top: -40px;\"><td nowrap height=\"20\" align=\"center\" id=\"lrcwt20\"></td></tr>
</table>
</div>
</center>
<script language=\"JavaScript\">
var lrc0;
var lrc1;
var min;
lrcobj = new lrcClass(lrcdata.innerHTML.slice(4,-3));

function lrcClass(tt)
{
this.inr = [];
this.min = [];

this.oTime = 0;

this.dts = -1;
this.dte = -1;
this.dlt = -1;
this.ddh;
this.fjh;

lrcbc.style.width = 0;

if(/\\[offset\\\\-?\\d+)\\]/i.test(tt))
this.oTime = RegExp.$1/1000;

tt = tt.replace(/\\[\\:\\][^$\\n]*(\\n|$)/g,\"$1\");
tt = tt.replace(/\\[[^\\[\\]\\:]*\\]/g,\"\");
tt = tt.replace(/\\[[^\\[\\]]*[^\\[\\]\\d]+[^\\[\\]]*\\:[^\\[\\]]*\\]/g,\"\");
tt = tt.replace(/\\[[^\\[\\]]*\\:[^\\[\\]]*[^\\[\\]\\d\\.]+[^\\[\\]]*\\]/g,\"\");
tt = tt.replace(/<[^<>]*[^<>\\d]+[^<>]*\\:[^<>]*>/g,\"\");
tt = tt.replace(/<[^<>]*\\:[^<>]*[^<>\\d\\.]+[^<>]*>/g,\"\");

while(/\\[[^\\[\\]]+\\:[^\\[\\]]+\\]/.test(tt))
{
tt = tt.replace(/((\\[[^\\[\\]]+\\:[^\\[\\]]+\\])+[^\\[\\r\\n]*)[^\\[]*/,\"\\n\");
var zzzt = RegExp.$1;
/^(.+\\])([^\\]]*)$/.exec(zzzt);
var ltxt = RegExp.$2;
var eft = RegExp.$1.slice(1,-1).split(\"][\");
for(var ii=0; ii<eft.length; ii++)
{
var sf = eft[ii].split(\":\");
var tse = parseInt(sf[0],10) * 60 + parseFloat(sf[1]);
var sso = { t:[] , w:[] , n:ltxt }
sso.t[0] = tse-this.oTime;
this.inr[this.inr.length] = sso;
}
}
this.inr = this.inr.sort( function(a,b){return a.t[0]-b.t[0];} );

for(var ii=0; ii<this.inr.length; ii++)
{
while(/<[^<>]+\\:[^<>]+>/.test(this.inr[ii].n))
{
this.inr[ii].n = this.inr[ii].n.replace(/<(\\d+)\\[\\d\\.]+)>/,\"%=%\");
var tse = parseInt(RegExp.$1,10) * 60 + parseFloat(RegExp.$2);
this.inr[ii].t[this.inr[ii].t.length] = tse-this.oTime;
}
lrcbc.innerHTML = \"<font>\"+ this.inr[ii].n.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/%=%/g,\"</font><font>\") +\"</font>\";
var fall = lrcbc.getElementsByTagName(\"font\");
for(var wi=0; wi<fall.length; wi++)
this.inr[ii].w[this.inr[ii].w.length] = fall[wi].offsetWidth;
this.inr[ii].n = lrcbc.innerText;
}

for(var ii=0; ii<this.inr.length-1; ii++)
this.min[ii] = Math.floor((this.inr[ii+1].t[0]-this.inr[ii].t[0])*10);
this.min.sort(function(a,b){return a-b});
min = this.min[0]/2;

this.run = function(tme)
{
if(tme<this.dts || tme>=this.dte)
{
var ii;
for(ii=this.inr.length-1; ii>=0 && this.inr[ii].t[0]>tme; ii--){}
if(ii<0) return;
this.ddh = this.inr[ii].t;
this.fjh = this.inr[ii].w;
this.dts = this.inr[ii].t[0];
this.dte = (ii<this.inr.length-1)?this.inr[ii+1].t[0]:aboutplayer.currentMedia.duration;

lrcwt1.innerText = this.retxt(ii-12);
lrcwt2.innerText = this.retxt(ii-11);
lrcwt3.innerText = this.retxt(ii-10);
lrcwt4.innerText = this.retxt(ii-9);
lrcwt5.innerText = this.retxt(ii-8);
lrcwt6.innerText = this.retxt(ii-7);
lrcwt7.innerText = this.retxt(ii-6);
lrcwt8.innerText = this.retxt(ii-5);
lrcwt9.innerText = this.retxt(ii-4);
lrcwt10.innerText = this.retxt(ii-3);
lrcwt11.innerText = this.retxt(ii-2);
lrcfilter.innerText = this.retxt(ii-1);
lrcwt12.innerText = this.retxt(ii-1);

lrcwt13.innerText = this.retxt(ii+1);
lrcwt14.innerText = this.retxt(ii+2);
lrcwt15.innerText = this.retxt(ii+3);
lrcwt16.innerText = this.retxt(ii+4);
lrcwt17.innerText = this.retxt(ii+5);
lrcwt18.innerText = this.retxt(ii+6);
lrcwt19.innerText = this.retxt(ii+7);
lrcwt20.innerText = this.retxt(ii+8);
this.print(this.retxt(ii));
if(this.dlt==ii-1)
{
clearTimeout(lrc0);
if(lrcoll.style.pixelTop!=0) lrcoll.style.top = 0;
golrcoll(0);
clearTimeout(lrc1);
lrcfilter.filters.alpha.opacity = 100;
golrcolor(0);
}
else if(parseInt(lrcoll.style.top)!=-20)
{
clearTimeout(lrc0);
lrcoll.style.top = -20;
clearTimeout(lrc1);
lrcfilter.filters.alpha.opacity = 0;
}
this.dlt = ii;
}
var bbw = 0;
var ki;
for(ki=0; ki<this.ddh.length && this.ddh[ki]<=tme; ki++)
bbw += this.fjh[ki];
var kt = ki-1;
var sc = ((ki<this.ddh.length)?this.ddh[ki]:this.dte) - this.ddh[kt];
var tc = tme - this.ddh[kt];
bbw -= this.fjh[kt] - tc / sc * this.fjh[kt];
if(bbw>lrcbox.offsetWidth)
bbw = lrcbox.offsetWidth;
lrcbc.style.width = Math.round(bbw);
}

this.retxt = function(i)
{
return (i<0 || i>=this.inr.length)?\"\":this.inr.n;
}

this.print = function(txt)
{
lrcbox.innerText = txt;
lrcbc.innerText = txt;
}

this.print(\"歌词加载中\");
lrcwt1.innerText = \"\";
lrcwt2.innerText = \"\";
lrcwt3.innerText = \"\";
lrcwt4.innerText = \"\";
lrcwt5.innerText = \"\";
lrcwt6.innerText = \"\";
lrcwt7.innerText = \"\";

lrcwt8.innerText = \"\";
lrcwt9.innerText = \"\";
lrcwt10.innerText = \"\";
lrcwt11.innerText = \"\";
lrcfilter.innerText = \"\";
lrcwt12.innerText = \"\";

lrcwt13.innerText = \"\";
lrcwt14.innerText = \"\";
lrcwt15.innerText = \"\";
lrcwt16.innerText = \"\";
lrcwt17.innerText = \"\";
lrcwt18.innerText = \"\";
lrcwt19.innerText = \"\";
lrcwt20.innerText = \"\";
}

function lrcrun()
{
with(aboutplayer)
{
lrcobj.run(controls.currentPosition);
}
if(arguments.length==0) setTimeout(\"lrcrun()\",10);
}

function golrcoll(s)
{
lrcoll.style.top = -(s++)*2;
if(s<=9)
lrc0 = setTimeout(\"golrcoll(\"+s+\")\",min*10);
}

function golrcolor(t)
{
lrcfilter.filters.alpha.opacity = 110-(t++)*10;
if(t<=10)
lrc1 = setTimeout(\"golrcolor(\"+t+\")\",min*10);
}
window.onerror = function()
{return true;}
lrcrun();
</script></div>

</CENTER>
<EMBED style=\"LEFT: 845; WIDTH: 160px; POSITION: absolute; TOP: 138; HEIGHT: 160px\" align=right src=http://www.shuyunxin.com/cc/flash/92.swf type=application/octet-stream wmode=\"transparent\" quality=\"high\" ;;></EMBED>

<SCRIPT language=JavaScript>
<!-- Logo Orbit II kurt.grigg@virgin.net

yourLogo=\'生 日 快 乐 .* 天 * 天 * 快 * 乐 *。\';
logoFont=\'Arial\';
logoSize=8;
logoColor=\'ffffff\';
logoWidth=40;
logoHeight=40;
logoSpeed=0.02;


//Nothing needs altering below!
yourLogo=yourLogo.split(\'\');
L=yourLogo.length;
Result=\"<font face=\"+logoFont+\" style=\'font-size:\"+logoSize+\"pt\' color=\"+logoColor+\">\";
TrigSplit=360/L;
br=(document.layers)?1:0;
if (br){
for (i=0; i < L; i++)
document.write(\'<layer name=\"ns\'+i+\'\" top=0 left=0 width=14 height=14\">\'+Result+yourLogo+\'</font></layer>\');
}
else{
document.write(\'<div id=\"outer\" style=\"position:absolute;top:0px;left:0px\"><div style=\"position:relative\">\');
for (i=0; i < L; i++)
document.write(\'<div id=\"ie\" style=\"position:absolute;top:0px;left:0px;width:14px;height:14px\">\'+Result+yourLogo+\'</font></div>\');
document.write(\'</div></div>\');
}
ypos=0;
xpos=0;
step=logoSpeed;
currStep=0;
Y=new Array();
X=new Array();
Yn=new Array();
Xn=new Array();
for (i=0; i < L; i++)
{
Yn=0;
Xn=0;
}
(document.layers)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
ypos = (document.layers)?evnt.pageY:event.y;
xpos = (document.layers)?evnt.pageX:event.x;
}
(document.layers)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
function animateLogo(){
if (!br)outer.style.pixelTop=document.body.scrollTop;
for (i=0; i < L; i++){
var layer=(document.layers)?document.layers[\'ns\'+i]:ie.style;
layer.top =Y+logoHeight*Math.sin(currStep+i*TrigSplit*Math.PI/180);
layer.left=X+logoWidth*Math.cos(currStep+i*TrigSplit*Math.PI/180);
}
currStep-=step;
}
function Delay(){
for (i=L; i >= 0; i--)
{
Y=Yn+=(ypos-Yn)*(0.1+i/L);
X=Xn+=(xpos-Xn)*(0.1+i/L);
}
animateLogo();
setTimeout(\'Delay()\',20);
}
window.onload=Delay;
// -->
</SCRIPT>

</body>
</html>

该用户从未签到

鲜花(0) 鸡蛋(0)
发表于 2009-11-8 21:10 | 显示全部楼层
好漂亮的贴,谢谢无忌提供代码!

该用户从未签到

鲜花(0) 鸡蛋(0)
发表于 2009-11-9 16:19 | 显示全部楼层
谢谢楼主的提供,辛苦了

该用户从未签到

鲜花(0) 鸡蛋(0)
发表于 2009-11-9 21:05 | 显示全部楼层
无忌好:这个同步是用js代码控制的和那个轮显相册是一样的,你这里设置了是20行的显示;你要少的话可以把多余的行去除就可以了!

该用户从未签到

鲜花(0) 鸡蛋(0)
 楼主| 发表于 2009-11-9 22:14 | 显示全部楼层
原帖由 祝福 于 2009-11-9 21:05 发表 无忌好:这个同步是用js代码控制的和那个轮显相册是一样的,你这里设置了是20行的显示;你要少的话可以把多余的行去除就可以了!
哈哈哈,祝福老师来了啊,谢了噢。我先试下,不懂再请教你

该用户从未签到

鲜花(0) 鸡蛋(0)
 楼主| 发表于 2009-11-9 22:31 | 显示全部楼层

头大了,这代码太难搞,昏倒

晕啊,下面我回的那个不能编辑了

好象还不可以哎

[ 本帖最后由 无忌未来 于 2009-11-10 22:06 编辑 ]

该用户从未签到

鲜花(0) 鸡蛋(0)
发表于 2009-11-10 19:33 | 显示全部楼层

无忌给你改好了再试试:

<html>
<head>
<title>女人如烟</title>
<STYLE>
TD { FONT-SIZE: 8pt; LINE-HEIGHT: 14px; }
BODY{
FONT-SIZE: 9pt;
LINE-HEIGHT: 16px;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
#lrcollbox td, #lrcollbox font {font-family: 华文新魏; font-size: 14px;}
#lrcoll td { color:#000000; cursor: default; }
#lrcbox { color:#FFFF00 }
#lrcfilter { filter: alpha(opacity=0) }
#lrcbc { color:#FF0000 }
</STYLE>
</head>
<img src=\"http://bbs.yhlove.com/attachments/month_0910/20091018_2dffdee04c63131b5759YpejbZ58uocs.jpg\">

<div style=\"position: absolute; z-index: 1; left:30px; top:170px\" id=\"layer1\">
<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<span id=\"lrcdata\"><!--


[ar:魏佳艺]
[al:女人如烟]
[by:歌手魏佳艺官方网站:中国星空网]
[00:00.63]女人如烟
[00:12.17]词曲:穆真 演唱:魏佳艺
[00:24.58]那天你用柔情将我点燃
[00:30.49]我开始变成你手中的烟
[00:36.48]你轻轻地将我含在唇间
[00:42.48]我的身姿弥漫了你的眼
[00:48.45]你漫不经心燃烧我的生命
[00:54.41]我也心甘情愿做你的烟
[01:00.37]也许你不经意的一个微笑
[01:06.34]我就义无反顾地来到你身边
[01:15.29]你说过 今生与烟为伴
[01:21.29]你说过 女人如烟你已习惯
[01:27.13]你说过 聚散离合随遇而安
[01:33.19]可我来世还要做你手中的烟
[01:39.36]想我了 就请你把我点燃
[01:45.19]任我幸福的泪缠绵你指尖
[01:51.13]化成灰也没有一丝遗憾
[01:57.20]让我今生来世为你陪伴
[02:03.11]间奏 词曲穆真 演唱魏佳艺
[02:26.90]那天你用柔情将我点燃
[02:32.90]我开始变成你手中的烟
[02:38.96]你轻轻地将我含在唇间
[02:44.90]我的身姿弥漫了你的眼
[02:50.89]你漫不经心燃烧我的生命
[02:56.79]我也心甘情愿做你的烟
[03:02.83]也许你不经意的一个微笑
[03:08.90]我就义无反顾地来到你身边
[03:17.71]空气中 寂寞在悄悄蔓延
[03:23.67]就算我化为烟雾也不忍离散
[03:29.58]好喜欢 你疼我说笨蛋噢乖
[03:35.67]我知道 我的感觉无法改变
[03:41.63]想我了 就请你把我点燃
[03:47.59]任我幸福的泪缠绵你指尖
[03:53.51]化成灰也没有一丝遗憾
[03:59.64]让我今生来世为你陪伴
[04:08.45]让我今生来世
[04:14.33]为你陪伴
--></span>
<center>
<OBJECT id=aboutplayer height=0 width=0
classid=clsid:6bf52a52-394a-11d3-b153-00c04f79faa6><ARAM NAME=\"url\" VALUE=\"http://www.mjbox.com/r/hz/hzyh66/MP3/女人如烟 魏佳艺.mp3\"><ARAM NAME=\"autostart\" VALUE=\"5\"><ARAM NAME=\"volume\" VALUE=\"100\"><PARAM NAME=\"enablecontextmenu\" VALUE=\"0\"><PARAM NAME=\"enableerrordialogs\" VALUE=\"0\"><param NAME=\"PlayCount\" VALUE=\"100\"></OBJECT>
</CENTER>
<div id=\"lrcollbox\" style=\"overflow:hidden; height:280; width:350;\" >
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" id=\"lrcoll\" style=\"position:relative; top: -20px;\" oncontextmenu=\"return false;\">
<tr><td nowrap height=\"20\" align=\"center\" id=\"lrcwt1\"></td></tr>
<tr><td nowrap height=\"20\" align=\"center\" id=\"lrcwt2\"></td></tr>

<tr><td nowrap height=\"20\" align=\"center\">
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr><td nowrap height=\"20\"><span id=\"lrcwt12\" style=\"height:20\"></span></td></tr>
<tr style=\"position:relative; top: -20px; z-index:6\"><td nowrap height=\"20\"><div id=\"lrcfilter\" style=\"overflow:hidden; width:100%; color:#FF00FF00; height:20\"></div></td></tr>
</table>
</td></tr>
<tr style=\"position:relative; top: -20px\"><td nowrap height=\"20\" align=\"center\">
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr><td nowrap height=\"20\"><span id=\"lrcbox\" style=\"height:20\">歌词加载中</span></td></tr>
<tr style=\"position:relative; top: -20px; z-index:6;\"><td nowrap height=\"20\"><div id=\"lrcbc\" style=\"overflow:hidden; height:20; width:0;\"></div></td></tr>
</table>
</td></tr>

</table>
</div>
</center>
<script language=\"JavaScript\">
var lrc0;
var lrc1;
var min;
lrcobj = new lrcClass(lrcdata.innerHTML.slice(4,-3));

function lrcClass(tt)
{
this.inr = [];
this.min = [];

this.oTime = 0;

this.dts = -1;
this.dte = -1;
this.dlt = -1;
this.ddh;
this.fjh;

lrcbc.style.width = 0;

if(/\\[offset\\\\-?\\d+)\\]/i.test(tt))
this.oTime = RegExp.$1/1000;

tt = tt.replace(/\\[\\:\\][^$\\n]*(\\n|$)/g,\"$1\");
tt = tt.replace(/\\[[^\\[\\]\\:]*\\]/g,\"\");
tt = tt.replace(/\\[[^\\[\\]]*[^\\[\\]\\d]+[^\\[\\]]*\\:[^\\[\\]]*\\]/g,\"\");
tt = tt.replace(/\\[[^\\[\\]]*\\:[^\\[\\]]*[^\\[\\]\\d\\.]+[^\\[\\]]*\\]/g,\"\");
tt = tt.replace(/<[^<>]*[^<>\\d]+[^<>]*\\:[^<>]*>/g,\"\");
tt = tt.replace(/<[^<>]*\\:[^<>]*[^<>\\d\\.]+[^<>]*>/g,\"\");

while(/\\[[^\\[\\]]+\\:[^\\[\\]]+\\]/.test(tt))
{
tt = tt.replace(/((\\[[^\\[\\]]+\\:[^\\[\\]]+\\])+[^\\[\\r\\n]*)[^\\[]*/,\"\\n\");
var zzzt = RegExp.$1;
/^(.+\\])([^\\]]*)$/.exec(zzzt);
var ltxt = RegExp.$2;
var eft = RegExp.$1.slice(1,-1).split(\"][\");
for(var ii=0; ii<eft.length; ii++)
{
var sf = eft[ii].split(\":\");
var tse = parseInt(sf[0],10) * 60 + parseFloat(sf[1]);
var sso = { t:[] , w:[] , n:ltxt }
sso.t[0] = tse-this.oTime;
this.inr[this.inr.length] = sso;
}
}
this.inr = this.inr.sort( function(a,b){return a.t[0]-b.t[0];} );

for(var ii=0; ii<this.inr.length; ii++)
{
while(/<[^<>]+\\:[^<>]+>/.test(this.inr[ii].n))
{
this.inr[ii].n = this.inr[ii].n.replace(/<(\\d+)\\[\\d\\.]+)>/,\"%=%\");
var tse = parseInt(RegExp.$1,10) * 60 + parseFloat(RegExp.$2);
this.inr[ii].t[this.inr[ii].t.length] = tse-this.oTime;
}
lrcbc.innerHTML = \"<font>\"+ this.inr[ii].n.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/%=%/g,\"</font><font>\") +\"</font>\";
var fall = lrcbc.getElementsByTagName(\"font\");
for(var wi=0; wi<fall.length; wi++)
this.inr[ii].w[this.inr[ii].w.length] = fall[wi].offsetWidth;
this.inr[ii].n = lrcbc.innerText;
}

for(var ii=0; ii<this.inr.length-1; ii++)
this.min[ii] = Math.floor((this.inr[ii+1].t[0]-this.inr[ii].t[0])*10);
this.min.sort(function(a,b){return a-b});
min = this.min[0]/2;

this.run = function(tme)
{
if(tme<this.dts || tme>=this.dte)
{
var ii;
for(ii=this.inr.length-1; ii>=0 && this.inr[ii].t[0]>tme; ii--){}
if(ii<0) return;
this.ddh = this.inr[ii].t;
this.fjh = this.inr[ii].w;
this.dts = this.inr[ii].t[0];
this.dte = (ii<this.inr.length-1)?this.inr[ii+1].t[0]:aboutplayer.currentMedia.duration;

lrcwt1.innerText = this.retxt(ii-12);
lrcwt2.innerText = this.retxt(ii-11);
this.print(this.retxt(ii));
if(this.dlt==ii-1)
{
clearTimeout(lrc0);
if(lrcoll.style.pixelTop!=0) lrcoll.style.top = 0;
golrcoll(0);
clearTimeout(lrc1);
lrcfilter.filters.alpha.opacity = 100;
golrcolor(0);
}
else if(parseInt(lrcoll.style.top)!=-20)
{
clearTimeout(lrc0);
lrcoll.style.top = -20;
clearTimeout(lrc1);
lrcfilter.filters.alpha.opacity = 0;
}
this.dlt = ii;
}
var bbw = 0;
var ki;
for(ki=0; ki<this.ddh.length && this.ddh[ki]<=tme; ki++)
bbw += this.fjh[ki];
var kt = ki-1;
var sc = ((ki<this.ddh.length)?this.ddh[ki]:this.dte) - this.ddh[kt];
var tc = tme - this.ddh[kt];
bbw -= this.fjh[kt] - tc / sc * this.fjh[kt];
if(bbw>lrcbox.offsetWidth)
bbw = lrcbox.offsetWidth;
lrcbc.style.width = Math.round(bbw);
}

this.retxt = function(i)
{
return (i<0 || i>=this.inr.length)?\"\":this.inr.n;
}

this.print = function(txt)
{
lrcbox.innerText = txt;
lrcbc.innerText = txt;
}

this.print(\"歌词加载中\");
lrcwt1.innerText = \"\";
lrcwt2.innerText = \"\";
}

function lrcrun()
{
with(aboutplayer)
{
lrcobj.run(controls.currentPosition);
}
if(arguments.length==0) setTimeout(\"lrcrun()\",10);
}

function golrcoll(s)
{
lrcoll.style.top = -(s++)*2;
if(s<=9)
lrc0 = setTimeout(\"golrcoll(\"+s+\")\",min*10);
}

function golrcolor(t)
{
lrcfilter.filters.alpha.opacity = 110-(t++)*10;
if(t<=10)
lrc1 = setTimeout(\"golrcolor(\"+t+\")\",min*10);
}
window.onerror = function()
{return true;}
lrcrun();
</script></div>

</body>
</html>

该用户从未签到

鲜花(0) 鸡蛋(0)
 楼主| 发表于 2009-11-10 22:03 | 显示全部楼层
原帖由 祝福 于 2009-11-10 19:33 发表 无忌给你改好了再试试: 女人如烟