思想碎片
Would you like to react to this message? Create an account in a few clicks or log in to continue.

引用《爱你多年》歌词同步特效代码贴制作

向下

引用《爱你多年》歌词同步特效代码贴制作 Empty 引用《爱你多年》歌词同步特效代码贴制作

帖子  Admin 周日 一月 08, 2012 7:23 pm

引用

平安如意 的 《爱你多年》歌词同步特效代码贴制作
一:新建一个记事本

二:把下面代码复制,粘贴到记事本里

三:代码

<HTML><BODY> <META http-equiv=Content-Type content="text/html; charset=gb2312">

<META content="MSHTML 6.00.2900.2668" name=GENERATOR></HEAD>

<style>

v\:*{behavior:url(#default#VML)}

v\:textpath{font-family:楷体_gb2312;font-size:20px;v-text-align:left}

</style>

<body>

<xmp id=xLyric style=display:none>

[ti:歌 词 同 步 特 效]

[00:00.00][爱你多年]

[ar:周慧敏]

[al:]

[00:02.00]歌 词 同 步 特 效

[00:06.00]平安如意编辑

[00:28.47]试着从你眼中寻找永远

[00:34.29]却只看到虚弱爱怜

[00:40.41]如果相爱一天也算有缘

[00:46.28]又何苦忧心你会变

[00:51.00]

[02:19.49][00:52.10]我尝试接受你空间的誓言

[02:25.34][00:58.14]芳华虚度一天一天

[02:31.26][01:04.07]到头苦恋一场却道无缘

[02:36.85][01:09.81]痴心如此千愁怎么解

[04:13.50][03:47.66][03:08.08][02:41.71][02:05.91][01:41.31][01:14.63]

[03:48.23][03:23.03][02:42.89][01:42.03][01:15.70]爱你这么多年青春空由寂寞填

[03:54.16][03:28.89][02:48.73][01:47.82][01:21.70]难道你都没看见

[04:00.45][03:34.96][02:54.82][01:53.93][01:27.70]爱你这么多年总是被你惹落泪

[04:06.92][03:42.52][03:02.08][01:59.93][01:33.61]你要伤我到哪天

</body></xmp>

</body>

</html>

<script>

window.onerror=function(){return false}

start()

function start(){

browser_ini()

timer_ini()

emv_ini()

lrc.setData(oo("xLyric").innerHTML)

lrc.write("歌曲载入中,请耐心等待...","l")

emv.play("http://218.75.172.156/37/C9/372E1B4AF83A2CAEBA716B2BBCADA9BA498DF5C9.wma")

}

function emv_ini(){

var l

window.emv={}

lrc_ini()

l="<div id=bxEmv style=position:absolute;left:100;top:220;width:600;height:460>"

l+="<div style=position:absolute;left:0;top:0;width:600;height:460;></div>"

l+="<div id=bxEmvScreen style=position:absolute;overflow:hidden;left:19;top:26;width:560;height:360;>"

l+="</div>"

l+="</div>"

l+="<object classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 id=mplayer width=250 height=200 style=display:none></object>"

insHtm(document.body,l)

emv.play=function(url){oo("mplayer").FileName=url;oo("mplayer").Play()}

emv.time=function(){

var mPos=mplayer.CurrentPosition,n=lrc.i

var n1,o,len,w,per,n0,n1

n1=n<lrc.arr.length-1?lrc.arr[n+1].slice(0,"|")*1:9999

if(n1<mPos){

lrc.i++

n++

if(n==0)

lrc.write(lrc.arr[n].slice("|"),"l")

if(n<lrc.arr.length-1)

lrc.write(lrc.arr[n+1].slice("|"),n%2==1?"l":"r")

}

if(n>=0){

n0=lrc.arr[n].slice(0,"|")

n1=lrc.arr.length>n+1?lrc.arr[n+1].slice(0,"|"):4

o=oo("bxCaption_"+(n%2==0?"l":"r")+"_cover")

len=o.time!=""?o.time*1:n1-n0

per=(mPos-n0)/len

for(i=0.001;i<1;i+=0.001){

per1=lrc.getRealPos(o,i)

if(per1>=per)

break

}

o.style.width=o.width*i

}

}

timer.add("emv.time()")

}

function lrc_ini(){

window.lrc={}

lrc.wordPer=function(str,pos){

return str.slice(0,pos).replace(/[^\x00-\xff]/g," ").length/str.replace(/[^\x00-\xff]/g," ").length

}

lrc.setData=function(str){

var l,a,i,ad,n,j

str=str.replace(/\|/g,"").replace(/\r\n/g,"\n")

str=str.replace(/\[(\d\d)\Sad\d\d)\.(\d\d)\]/g,function($0,$1,$2,$3){return ($1*60+$2*1+$3/100)+"|"})

a=str.split("\n")

lrc.arr=new Array()

for(i=0;i<a.length;i++){

ad=a.split("|")

for(j=1;j<ad.length;j++){

lrc.arr.add(ad[j-1]+"|"+ad[ad.length-1])

}

}

lrc.i=-1

sortIndex=0

sortDir=1

lrc.arr.sort(sortFoo)

}

lrc.getRealPos=function(obj,pos){

var a=obj.path,zoom=obj.zoom,pos1=pos*zoom

var a,i,ad

for(i=0;i<a.length;i++){

ad=a

if(pos<=ad[0])

continue

if(pos>ad[0]&&pos<=ad[1])

pos1+=(zoom*ad[2]-zoom)*(pos-ad[0])

else{

pos1+=(zoom*ad[2]-zoom)*(ad[1]-ad[0])

}

}

return pos1

}

lrc.write=function(str,pos){

var word=str,style=""

var x,y,l,w,w1,o,a,i,ad

if(/^\<.+\>/.test(str)){

word=str.slice(">")

style=str.slice(1).slice(0,">")

}

w=word.replace(/[^\x00-\xff]/g," ").length*13+2

if(pos=="l"){

x=40

y=285

}

else{

x=520-w

y=315

}

l="<div id=bxCaption_"+pos+" style='position:absolute;left:"+x+";top:"+y+";width:"+w+";height:32;overflow:hidden'>"

l+="<v:curve to=800,1 strokecolor=black strokeweight=3 style=position:absolute;top:14>"

l+="<v:path textpathok=t /><v:textpath on=t string='"+word+"' /></v:curve>"

l+="<v:curve to=800,1 strokecolor=white fillcolor=white strokeweight=1 style=position:absolute;top:14>"

l+="<v:path textpathok=t /><v:textpath on=t string='"+word+"' /></v:curve>"

l+="</div>"

l+="<div id=bxCaption_"+pos+"_cover width="+w+" style=position:absolute;left:"+x+";top:"+y+";width:0;height:32;overflow:hidden>"

l+="<v:curve to=800,1 strokecolor=white strokeweight=3 style=position:absolute;top:14>"

l+="<v:path textpathok=t /><v:textpath on=t string='"+word+"' /></v:curve>"

l+="<v:curve to=800,1 strokecolor=blue fillcolor=blue strokeweight=1 style=position:absolute;top:14>"

l+="<v:path textpathok=t /><v:textpath on=t string='"+word+"' /></v:curve>"

l+="</div>"

odel("bxCaption_"+pos)

odel("bxCaption_"+pos+"_cover")

insHtm("bxEmvScreen",l)

o=oo("bxCaption_"+pos+"_cover")

o.time=style.get("time")

o.path=new Array()

len1=1

a=style.split(";")

for(i=0;i<a.length;i++){

if(!/(\d+)Sad\d+)/.test(a))

continue

if(/(\d+)-(\d+)Sad\d+)/.test(a)){

ad=/(\d+)-(\d+)Sad\d+)/.exec(a)

ad[0]=lrc.wordPer(word,ad[1]-1)

ad[1]=lrc.wordPer(word,ad[2]*1)

ad[2]=ad[3]

}

else{

ad=/(\d+)Sad.+)/.exec(a)

ad[0]=lrc.wordPer(word,ad[1]-1)

ad[1]=lrc.wordPer(word,ad[1]*1)

}

len1+=(ad[1]-ad[0])*(ad[2]-1)

o.path.add(ad)

}

o.zoom=1/len1

}

}

function browser_ini(){

window.isIE=navigator.userAgent.indexOf("IE")>0

window.isIE5=navigator.userAgent.indexOf("IE 5.0")>0

String.prototype.trim=function(){return this.replace(/(^[\s]*)|([\s]*$)/g,"")}

String.prototype.inc=function(s1,s2){if(s2==null){s2=","};return (s2+this+s2).indexOf(s2+s1+s2)>-1?true:false}

String.prototype._slice="".slice

String.prototype.slice=function(n1,n2){var v,b1=typeof(n1)=="number",b2=typeof(n2)=="number";if(!b1||typeof(n2)=="string"){v=eval("this._slice("+(b1?n1:this.indexOf(n1)+(n2==null?1:0)+(this.indexOf(n1)==-1?this.length:0))+(n2==null?"":(b2?n2:(this.indexOf(n2)==-1?"":","+this.indexOf(n2))))+")")}else{v=isIE5&&n1<0&&n2==null?this._slice(this.length-1):eval("this._slice(n1"+(n2==null?"":","+n2)+")")}return v}

String.prototype.get=function(str,def){if(this.inc(str,";"))return 1;var a=this.match(new RegExp("(^|Wink"+str+":[^;]*"));return a==null||str==""?(def==null?"":def):a[0].replace(";","").slice(str.length+1)}

Array.prototype.add=function(key){this[this.length]=key}

window.oo=function(obj){return typeof(obj)=="string"?document.getElementById(obj):obj}

window.insHtm=function(op,html,inEnd){op=oo(op);if(isIE){op.insertAdjacentHTML(inEnd==null?"beforeend":"afterbegin",html)}else{var r=op.ownerDocument.createRange();r.setStartBefore(op);eval("op."+(inEnd==null?"appendChild":"insertBefore")+"(r.createContextualFragment(html),op.firstChild)");}}

window.odel=function(obj){if(oo(obj)!=null){oo(obj).parentNode.removeChild(oo(obj))}}

if(!isIE){

HTMLElement.prototype.contains=function(node){if(!node)return false;do if(node==this){return true}while(node=node.parentNode){return false}}

Event.prototype.__defineGetter__("srcElement",function(){var node=this.target;while(node.nodeType!=1){node=node.parentNode}return node})

Event.prototype.__defineGetter__("toElement",function(){return this.relatedTarget})

}

}

function timer_ini(){

window.timer={}

timer.handle=null

timer.queue=""

timer.i=0

timer.add=function(key){if(!timer.queue.inc(key,";")){timer.queue+=key+";"}}

timer.del=function(key){timer.queue=move.queue.replace(key+";","")}

timer.inv=function(){

window.clearTimeout(timer.handle)

eval(timer.queue)

timer.i++

timer.handle=window.setTimeout("timer.inv()",10)

}

timer.inv()

}

function sortFoo(v1,v2){

var s1=v1.split("|")[sortIndex],s2=v2.split("|")[sortIndex]

if(!isNaN(s1)&&!isNaN(s2)){

s1*=1

s2*=1

}

return (s1==s2?0:(s1>s2?1:-1))*sortDir

}

</script>

<EMBED style="LEFT: 250px; POSITION: absolute; TOP:50px" align=right src=http://sucai.heima.com/sucai/news/flash/34.swf width=700 height=500 type=application/octet-stream ; quality="high" wmode="transparent">

<EMBED style="LEFT: 50px; POSITION: absolute; TOP:50px" align=right src=http://www.wosowoso.com/flash/13/woso_c_flash_5.swf

width=1000 height=500 type=application/octet-stream ; quality="high" wmode="transparent">

<EMBED style="LEFT: 200px; POSITION: absolute; TOP: -50px" align=right src=http://www.wosowoso.com/flash/13/woso_c_flash_18.swf width=1000 height=350 type=application/octet-stream ; quality="high" wmode="transparent">

<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>

<TABLE height=600 cellSpacing=0 cellPadding=0 width=1024 background=http://i.namipan.com/files/7e4a639e3aacb9b1bcc4f1fb418ef87ebe09cfdbcc0203007d25/0/1.jpg width=1024 border=1 bortercolor="#000000">

<TBODY>

<TR>

<TD></TD></TR></TBODY></TABLE></DIV>

</BODY></HTML>

四:看到上面这么多代码晕了吧,其别的代码不要看,你只要改动上面红色的地方就可以了。(图片地址 ,音乐地址,歌词 swf)

五:图片地址和音乐地址还有歌词都可以到网上搜

这里讲一下怎么搜歌词

首先打开下面网站(任选一个)

http://www.51lrc.com/

http://www.jpwy.net/gc/

http://lrc.feiyes.net/(推荐)

我的习惯都是自己编辑。

六:复制LRC歌词,粘贴到刚才那个记事本里代码里放歌词的地方图片地址和音乐地址我想你知道怎么换了,这里就不说了。

七:点击记事本上面的文件另存为后缀为.TXT,存在你能找到的地方。

八:然后把这后缀为.TXT的文件上传到网络。上传成功后就能拿到网页地址了,把这个地址复制粘贴到下面这组代码中:

<DIV style="LEFT: -220px; WIDTH: 1000px; POSITION: relative; TOP: 150px"><IFRAME marginWidth=0 marginHeight=0 src="网页地址" frameBorder=0 width=1000 scrolling=no height=600></IFRAME></DIV>

九:最后把上面这组代码复制到支持网页格式的音画网上 发贴

效果欣赏:

http://ybh1951.814e.com/特效音画txt/爱你多年2.txt

Admin
Admin

帖子数 : 147
注册日期 : 12-01-05

http://sxsp.999luntan.com

返回页首 向下

返回页首


 
您在这个论坛的权限:
不能在这个论坛回复主题