查看: 2170|回復: 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)
5#
發表于 2009-11-9 16:19 | 只看該作者
謝謝樓主的提供,辛苦了

該用戶從未簽到

鮮花(0) 雞蛋(0)
6#
發表于 2009-11-9 21:05 | 只看該作者
無忌好:這個同步是用js代碼控制的和那個輪顯相冊是一樣的,你這里設置了是20行的顯示;你要少的話可以把多余的行去除就可以了!

該用戶從未簽到

鮮花(0) 雞蛋(0)
7#
 樓主| 發表于 2009-11-9 22:14 | 只看該作者
原帖由 祝福 于 2009-11-9 21:05 發表 無忌好:這個同步是用js代碼控制的和那個輪顯相冊是一樣的,你這里設置了是20行的顯示;你要少的話可以把多余的行去除就可以了!
哈哈哈,祝福老師來了啊,謝了噢。我先試下,不懂再請教你

該用戶從未簽到

鮮花(0) 雞蛋(0)
8#
 樓主| 發表于 2009-11-9 22:31 | 只看該作者

頭大了,這代碼太難搞,昏倒

暈啊,下面我回的那個不能編輯了

好象還不可以哎

[ 本帖最后由 無忌未來 于 2009-11-10 22:06 編輯 ]

該用戶從未簽到

鮮花(0) 雞蛋(0)
9#
發表于 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)
10#
 樓主| 發表于 2009-11-10 22:03 | 只看該作者

原帖由 祝福 于 2009-11-10 19:33 發表 無忌給你改好了再試試: 女人如煙