转-代码特效教程之六 【歌词同步】 (2010-03-22 11:20:18)转载▼
转-代码特效教程之六 【歌词同步】 (2010-03-22 11:20:18)转载▼
[code]转-代码特效教程之六 【歌词同步】 (2010-03-22 11:20:18)转载▼
分类: 音画
html>
<head>
<title>【婷儿音画】想起</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (xq.psd) -->
<img src="xq1.jpg" width="1000" height="500" alt="">
<!-- End ImageReady Slices -->
<HTML xmlns:v>
<STYLE>v\:* {
BEH***IOR: url(#default#VML)
}
v\:textpath {
FONT-SIZE: 18px; FONT-FAMILY: 楷体_gb2312; v-text-align: left
}
</STYLE>
<XMP id=xLyric style="DISPLAY: none">
[ti:想起]
[ar:韩雪]
[al: 飘]
[by:婷儿]
[00:04.78]想起---韩雪
[00:09.75]华声论坛音画学堂
[00:13.66]音画制作:婷儿
[00:20.98]回到相约的地点
[00:26.89]才知我对你不了解
[00:33.13]以为爱得深就不怕伤悲
[00:38.00]偏偏爱让心成雪
[00:44.98]我独自走在寂寞的长街
[00:50.55]回忆一幕幕重演
[00:56.41]我告诉自己勇敢去面对
[01:01.60]就算心碎也完美
[01:07.85]想起我和你牵手的画面
[01:13.67]泪水化成雨下满天
[01:19.85]如果我和你还能再见面
[01:25.43]就让情意旧梦能圆
[01:35.99]---Music---
[01:42.90]我们在不同的世界
[01:48.51]想着每一次的误会
[01:55.02]好像再一次依偎你身边
[01:59.82]偏偏你有千里远
[02:07.00]我独自走在寂寞的长街
[02:12.00]回忆一幕幕重演
[02:18.33]我告诉自己勇敢去面对
[02:23.44]就算心碎也完美
[02:29.59]想起我和你牵手的画面
[02:35.93]泪水化成雨下满天
[02:42.05]如果我和你还能再见面
[02:46.75]就让情意旧梦能圆
[03:17.35]想起我和你牵手的画面
[03:22.63]泪水化成雨下满天
[03:28.56]如果我和你还能再见面
[03:34.30]就让情意旧梦能圆
[03:40.77]想起我和你牵手的画面
[03:45.99]泪水化成雨下满天
[03:51.89]如果我和你还能再见面
[03:57.64]就让情意旧梦能圆
[04:04.17]就让情意旧梦能圆
[04:09.57]婷儿音画---谢谢欣赏
</XMP>
<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("xq.mp3")
}
function emv_ini(){
var l
window.emv={}
lrc_ini()
l="<div id=bxEmv style=position:absolute;left:370;top:65;width:550;height:460>"
l+="<div style=position:absolute;left:0;top:0;width:550;height:460;></div>"
l+="<div id=bxEmvScreen style=position:absolute;overflow:hidden;left:29;top:6;width:500;height:460;>"
l+="</div>"
l+="</div>"
l+="<object classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 id=mplayer width=200 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)\\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[i].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[i]
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=30
y=310
}
else{
x=320-w
y=340
}
l="<div id=bxCaption_"+pos+" style='position:absolute;left:"+x+";top:"+y+";width:"+w+";height:26;overflow:hidden'>"
l+="<v:curve to=600,1 strokecolor=green strokeweight=2 style=position:absolute;top:14>"
l+="<v:path textpathok=t /><v:textpath on=t string='"+word+"' /></v:curve>"
l+="<v:curve to=600,1 strokecolor=#FFFAFA 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=600,1 strokecolor=#FFFAFA strokeweight=3 style=position:absolute;top:14>"
l+="<v:path textpathok=t /><v:textpath on=t string='"+word+"' /></v:curve>"
l+="<v:curve to=600,1 strokecolor=#FF0000 fillcolor=#FF0000 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+)\d+)/.test(a[i]))
continue
if(/(\d+)-(\d+)\d+)/.test(a[i])){
ad=/(\d+)-(\d+)\d+)/.exec(a[i])
ad[0]=lrc.wordPer(word,ad[1]-1)
ad[1]=lrc.wordPer(word,ad[2]*1)
ad[2]=ad[3]
}
else{
ad=/(\d+).+)/.exec(a[i])
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(){
windows.isIE=navigator.userAgent.indexOf("IE")>0
windows.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_r("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_r("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("(^|"+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.getElementByIdx(obj):obj}
windows.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_r("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_r(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: 754px; WIDTH: 200px; POSITION: absolute; TOP: 343px; HEIGHT: 200px" align=right src=1.swf width=200 height=200 type=application/octet-stream wmode="transparent" quality="high" ;;></EMBED>
<EMBED style="LEFT: 580px; WIDTH: 200px; POSITION: absolute; TOP: 160px; HEIGHT: 50px" align=right src=2.swf width=200 height=50 type=application/octet-stream wmode="transparent" quality="high" ;;></EMBED>
</body>
</html>[/quote](ctrl+q)
分类: 音画
html>
<head>
<title>【婷儿音画】想起</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (xq.psd) -->
<img src="xq1.jpg" width="1000" height="500" alt="">
<!-- End ImageReady Slices -->
<HTML xmlns:v>
<STYLE>v\:* {
BEH***IOR: url(#default#VML)
}
v\:textpath {
FONT-SIZE: 18px; FONT-FAMILY: 楷体_gb2312; v-text-align: left
}
</STYLE>
<XMP id=xLyric style="DISPLAY: none">
[ti:想起]
[ar:韩雪]
[al: 飘]
[by:婷儿]
[00:04.78]想起---韩雪
[00:09.75]华声论坛音画学堂
[00:13.66]音画制作:婷儿
[00:20.98]回到相约的地点
[00:26.89]才知我对你不了解
[00:33.13]以为爱得深就不怕伤悲
[00:38.00]偏偏爱让心成雪
[00:44.98]我独自走在寂寞的长街
[00:50.55]回忆一幕幕重演
[00:56.41]我告诉自己勇敢去面对
[01:01.60]就算心碎也完美
[01:07.85]想起我和你牵手的画面
[01:13.67]泪水化成雨下满天
[01:19.85]如果我和你还能再见面
[01:25.43]就让情意旧梦能圆
[01:35.99]---Music---
[01:42.90]我们在不同的世界
[01:48.51]想着每一次的误会
[01:55.02]好像再一次依偎你身边
[01:59.82]偏偏你有千里远
[02:07.00]我独自走在寂寞的长街
[02:12.00]回忆一幕幕重演
[02:18.33]我告诉自己勇敢去面对
[02:23.44]就算心碎也完美
[02:29.59]想起我和你牵手的画面
[02:35.93]泪水化成雨下满天
[02:42.05]如果我和你还能再见面
[02:46.75]就让情意旧梦能圆
[03:17.35]想起我和你牵手的画面
[03:22.63]泪水化成雨下满天
[03:28.56]如果我和你还能再见面
[03:34.30]就让情意旧梦能圆
[03:40.77]想起我和你牵手的画面
[03:45.99]泪水化成雨下满天
[03:51.89]如果我和你还能再见面
[03:57.64]就让情意旧梦能圆
[04:04.17]就让情意旧梦能圆
[04:09.57]婷儿音画---谢谢欣赏
</XMP>
<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("xq.mp3")
}
function emv_ini(){
var l
window.emv={}
lrc_ini()
l="<div id=bxEmv style=position:absolute;left:370;top:65;width:550;height:460>"
l+="<div style=position:absolute;left:0;top:0;width:550;height:460;></div>"
l+="<div id=bxEmvScreen style=position:absolute;overflow:hidden;left:29;top:6;width:500;height:460;>"
l+="</div>"
l+="</div>"
l+="<object classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 id=mplayer width=200 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)\\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[i].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[i]
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=30
y=310
}
else{
x=320-w
y=340
}
l="<div id=bxCaption_"+pos+" style='position:absolute;left:"+x+";top:"+y+";width:"+w+";height:26;overflow:hidden'>"
l+="<v:curve to=600,1 strokecolor=green strokeweight=2 style=position:absolute;top:14>"
l+="<v:path textpathok=t /><v:textpath on=t string='"+word+"' /></v:curve>"
l+="<v:curve to=600,1 strokecolor=#FFFAFA 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=600,1 strokecolor=#FFFAFA strokeweight=3 style=position:absolute;top:14>"
l+="<v:path textpathok=t /><v:textpath on=t string='"+word+"' /></v:curve>"
l+="<v:curve to=600,1 strokecolor=#FF0000 fillcolor=#FF0000 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+)\d+)/.test(a[i]))
continue
if(/(\d+)-(\d+)\d+)/.test(a[i])){
ad=/(\d+)-(\d+)\d+)/.exec(a[i])
ad[0]=lrc.wordPer(word,ad[1]-1)
ad[1]=lrc.wordPer(word,ad[2]*1)
ad[2]=ad[3]
}
else{
ad=/(\d+).+)/.exec(a[i])
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(){
windows.isIE=navigator.userAgent.indexOf("IE")>0
windows.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_r("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_r("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("(^|"+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.getElementByIdx(obj):obj}
windows.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_r("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_r(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: 754px; WIDTH: 200px; POSITION: absolute; TOP: 343px; HEIGHT: 200px" align=right src=1.swf width=200 height=200 type=application/octet-stream wmode="transparent" quality="high" ;;></EMBED>
<EMBED style="LEFT: 580px; WIDTH: 200px; POSITION: absolute; TOP: 160px; HEIGHT: 50px" align=right src=2.swf width=200 height=50 type=application/octet-stream wmode="transparent" quality="high" ;;></EMBED>
</body>
</html>[/quote](ctrl+q)
您在这个论坛的权限:
您不能在这个论坛回复主题