查看: 1789|回复: 4

求教~如何循环~代码?

[复制链接]

该用户从未签到

鲜花(0) 鸡蛋(0)
发表于 2009-5-26 23:05 | 显示全部楼层 |阅读模式
<><FONT style="BACKGROUND-COLOR: #fbf1e1">怎么让下面的代码,红色部分循环播放?</FONT></P>
<><FONT color=red>&lt;DIV style="LEFT: -0px; WIDTH: 1000px; POSITION: relative; TOP: 0px"&gt;</FONT></P>
<><FONT color=red>&lt;IFRAME marginWidth=0 marginHeight=0 src="</FONT><A href="http://www.168cctv.net/attachment/7_885_7c4d8063fc18764.html"><FONT color=red>http://www.168cctv.net/attachment/7_885_7c4d8063fc18764.html</FONT></A><FONT color=red>" frameBorder=0 width=1000 scrolling=no height=600&gt;&lt;/IFRAME&gt;&lt;/DIV&gt;</FONT></P>
<P> </P>
<P>&lt;DIV id=font1  <BR>style="Z-INDEX: 1; LEFT: 250px; WIDTH: 650px; POSITION: absolute; TOP: 50px; HEIGHT: 50px"&gt;<BR>&lt;marquee direction=left scrollAmount=3 &gt;</P>
<P>&lt;FONT face=华文新魏 color=#8FBC8F<BR>size=5&gt;《日    出》影 音画&lt;/FONT&gt;&lt;/marquee&gt;&lt;/DIV&gt;</P>
<P>&lt;t:transitionFilter id="a" targetElement="00" type="progidXImageTransform.Microsoft.GradientWipe(sProperties)"  subtype="crossFade" mode="in" dur="5" autoreverse="false" repeatcount="indefinite"&gt;&lt;/t:transitionFilter&gt;  <BR>&lt;/DIV&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;<BR>&lt;STYLE&gt;<BR>v\:*{behavior:url(#default#VML)}<BR>v\:textpath{font-family:华文新魏_gb2312;font-size:26px;v-text-align:left}<BR>&lt;/STYLE&gt;<BR>                &lt;td&gt;</P>
<P>&lt;BODY&gt;&lt;XMP id=xLyric style="DISPLAY: none"&gt;<BR>[ti:日出]<BR>[ar:林一心]<BR>[by:影]</P>
<P>[ti:日出]<BR>[ar:林一心]<BR>[al:Fantasy]<BR>[by: 影~制作] <BR>[00:00.00]《日出》<BR>[00:08.00]演唱:林一心<BR>[00:12.00]影~制作<BR>[00:18.00]结束<BR>[00:20.00]我们来不急完成的旅途<BR>[00:24.48]这旅途失去了永驻<BR>[00:32.00]...<BR>[00:35.00]相识写到一半的书<BR>[00:39.00]...<BR>[00:41.48]结局没有记录<BR>[00:46.30]我忍得住<BR>[00:50.00]先哭的人未必比较痛苦<BR>[00:55.00]你有朋友安抚<BR>[00:58.48]谁来给我祝福<BR>[00.59.50]我等待下一个日出<BR>[01:04.40]照亮我灵魂最深处<BR>[01:08.00]我得手握不住<BR>[01:11.00]爱情的追逐<BR>[01:12.00]我们的幸福<BR>[01:16.00]我等待下一个日出<BR>[01:19.00]回忆如果还有温度<BR>[01:24.40]我愿用我的全部<BR>[01:29.00]换你的回顾<BR>[01:35.00]...<BR>[01:50.00]追逐<BR>[01:52.00]这一场失去意义的追逐<BR>[01:56.00]却陷入遗憾的国度<BR>[02:03.00]在我的眼前起得雾<BR>[02:12.00]模糊所有出路<BR>[02:18.00]我很羡慕<BR>[02.20.30]你可以一边哭一边康复<BR>[02:25.30]我那么多感触无法真情流露<BR>[02:31.30]我等待下一个日出<BR>[02:35.00]照亮我灵魂最深处<BR>[02:39.00]我得手握不住爱情的追逐<BR>[02:44.00]我们的幸福<BR>[02:47.00]我等待下一个日出<BR>[02:50.00]回忆如果还有温度<BR>[02:56.00]我愿用我的全部<BR>[03:00.00]换你的回顾<BR>[03:05.00]我等待下一个日出<BR>[03:08.00]照亮我灵魂最深处<BR>[03:11.48]我得手握不住爱情的追逐<BR>[03:17.48]我们的幸福<BR>[03:19.48]我等待下一个日出<BR>[03:23.00]回忆如果还有温度<BR>[03:28.00]我愿用我的全部<BR>[03:33.00]换你的回顾<BR>[03:38.00]...<BR>[03:41.00]我很在乎<BR>[03:45.00]只是爱不等于能够相处<BR>[03:50.00]你让我看清楚<BR>[03:58.00]...<BR>&lt;/XMP&gt;<BR>&lt;SCRIPT&gt;<BR>window.onerror=function(){return false}<BR>start()<BR>function start(){<BR> browser_ini()<BR> timer_ini()<BR> emv_ini()<BR> lrc.setData(oo("xLyric").innerHTML)<BR> lrc.write("歌曲载入中...","l")<BR> emv.play("<A href="http://99wma.dns.fssylmp3.cn:8221/21z/0/daodaily090520/1/3d0053211e39e749_1.wma">http://99wma.dns.fssylmp3.cn:8221/21z/0/daodaily090520/1/3d0053211e39e749_1.wma</A>")<BR>}<BR>function emv_ini(){<BR> var l<BR> window.emv={}<BR> lrc_ini()<BR> l="&lt;div id=bxEmv style=position:absolute;left:12;top:0;width:1000;height:480&gt;"<BR>        l+="&lt;div id=bxEmvScreen style=position:absolute;overflow:hidden;left:12;top:0;width:1000;height:580;background:url()&gt;"<BR>        l+="&lt;/div&gt;"<BR> l+="&lt;/div&gt;"<BR> l+="&lt;object classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 id=mplayer  width=0 height=0style=display:xnone;position:absolute;left:20;top:359&gt;&lt;param name=PlayCount value=0&gt;&lt;param name=ShowStatusBar value=-1&gt;&lt;param name=Volume value=0&gt;&lt;/object&gt;"<BR> insHtm(document.body,l)<BR> emv.play=function(url){oo("mplayer").FileName=url;oo("mplayer").Play()}<BR> emv.time=function(){<BR>  var mPos<BR>  var n1,o,len,w,per,n0,n1<BR>  if(mplayer==null)<BR>   return<BR>  mPos=mplayer.CurrentPosition<BR>  n=-1<BR>  for(i=0;i&lt;lrc.arr.length;i++){<BR>   if(mPos&lt;lrc.arr.slice(0,"|")*1)<BR>    break<BR>   n=i<BR>  }<BR>  if(n==-1)<BR>   return<BR>  if(lrc.i!=n){<BR>   if(n==0)<BR>    lrc.write(lrc.arr[n].slice("|"),"l")<BR>   if(n!=lrc.i+1)<BR>    lrc.write(lrc.arr[n].slice("|"),n%2==0?"l":"r")<BR>   if(n&lt;lrc.arr.length-1)<BR>    lrc.write(lrc.arr[n+1].slice("|"),n%2==1?"l":"r")<BR>   lrc.i=n<BR>  }<BR>  n0=lrc.arr[n].slice(0,"|")<BR>  n1=lrc.arr.length&gt;n+1?lrc.arr[n+1].slice(0,"|"):4<BR>  o=oo("bxCaption_"+(n%2==0?"l":"r")+"_cover")<BR>  len=o.time!=""?o.time*1:n1-n0<BR>  per=(mPos-n0)/len<BR>  for(i=0.001;i&lt;1;i+=0.001){<BR>   per1=lrc.getRealPos(o,i)<BR>   if(per1&gt;=per)<BR>    break<BR>  }<BR>  o.style.width=o.width*i<BR> }<BR> timer.add("emv.time()")<BR>}<BR>function lrc_ini(){<BR> window.lrc={}<BR> lrc.wordPer=function(str,pos){<BR>  return str.slice(0,pos).replace(/[^\x00-\xff]/g,"  ").length/str.replace(/[^\x00-\xff]/g,"  ").length<BR> }<BR> lrc.setData=function(str){<BR>  var l,a,i,ad,n,j<BR>  str=str.replace(/\|/g,"").replace(/\r\n/g,"\n")<BR>  str=str.replace(/\[(\d\d)\\d\d)\.(\d\d)\]/g,function($0,$1,$2,$3){return ($1*60+$2*1+$3/100)+"|"})<BR>  a=str.split("\n")<BR>  lrc.arr=new Array()<BR>  for(i=0;i&lt;a.length;i++){<BR>   ad=a.split("|")<BR>   for(j=1;j&lt;ad.length;j++){<BR>    lrc.arr.add(ad[j-1]+"|"+ad[ad.length-1])<BR>   }<BR>  }<BR>  lrc.i=-1<BR>  sortIndex=0<BR>  sortDir=1<BR>  lrc.arr.sort(sortFoo)<BR> }<BR> lrc.getRealPos=function(obj,pos){<BR>  var a=obj.path,zoom=obj.zoom,pos1=pos*zoom<BR>  var a,i,ad<BR>  for(i=0;i&lt;a.length;i++){<BR>   ad=a<BR>   if(pos&lt;=ad[0])<BR>    continue<BR>   if(pos&gt;ad[0]&amp;&amp;pos&lt;=ad[1])<BR>    pos1+=(zoom*ad[2]-zoom)*(pos-ad[0])<BR>   else<BR>    pos1+=(zoom*ad[2]-zoom)*(ad[1]-ad[0])<BR>    <BR>  }<BR>  return pos1<BR> }<BR> lrc.write=function(str,pos){<BR>  var word=str,style=""<BR>  var x,y,l,w,w1,o,a,i,ad<BR>  if(/^\&lt;.+\&gt;/.test(str)){<BR>   word=str.slice("&gt;")<BR>   style=str.slice(1).slice(0,"&gt;")<BR>  }<BR>  w=word.replace(/[^\x00-\xff]/g,"  ").length*13+2<BR>  if(pos=="l"){<BR>   x=40<BR>                            y=519<BR>  }<BR>  else{<BR>   x=930-w<BR>   y=519<BR>  }<BR>l="&lt;div id=bxCaption_"+pos+" style='position:absolute;left:"+x+";top:"+y+";width:"+w+";height:32;overflow:hidden'&gt;"<BR>  l+="&lt;v:curve to=800,1 strokecolor=black strokeweight=3 style=position:absolute;top:14&gt;"<BR>  l+="&lt;v:path textpathok=t /&gt;&lt;v:textpath on=t string='"+word+"' /&gt;&lt;/v:curve&gt;"<BR>  l+="&lt;v:curve to=800,1 strokecolor=#ffff00 fillcolor=#ffff00 strokeweight=1 style=position:absolute;top:14&gt;"<BR>  l+="&lt;v:path textpathok=t /&gt;&lt;v:textpath on=t string='"+word+"' /&gt;&lt;/v:curve&gt;"<BR>  l+="&lt;/div&gt;"<BR>  l+="&lt;div id=bxCaption_"+pos+"_cover width="+w+" style=position:absolute;left:"+x+";top:"+y+";width:0;height:32;overflow:hidden&gt;"<BR>  l+="&lt;v:curve to=800,1 strokecolor=white strokeweight=3 style=position:absolute;top:14&gt;"<BR>  l+="&lt;v:path textpathok=t /&gt;&lt;v:textpath on=t string='"+word+"' /&gt;&lt;/v:curve&gt;"<BR>  l+="&lt;v:curve to=800,1 strokecolor=#ff0000 fillcolor=#ff0000 strokeweight=1 style=position:absolute;top:14&gt;"<BR>  l+="&lt;v:path textpathok=t /&gt;&lt;v:textpath on=t string='"+word+"' /&gt;&lt;/v:curve&gt;"<BR>  l+="&lt;/div&gt;"<BR>  odel("bxCaption_"+pos)<BR>  odel("bxCaption_"+pos+"_cover")<BR>  insHtm("bxEmvScreen",l)<BR>  o=oo("bxCaption_"+pos+"_cover")<BR>  o.time=style.get("time")<BR>  o.path=new Array()<BR>  len1=1<BR>  a=style.split(";")<BR>  for(i=0;i&lt;a.length;i++){<BR>   if(!/(\d+)\d+)/.test(a))<BR>    continue<BR>   if(/(\d+)-(\d+)\d+)/.test(a)){<BR>    ad=/(\d+)-(\d+):(\d+)/.exec(a)<BR>    ad[0]=lrc.wordPer(word,ad[1]-1)<BR>    ad[1]=lrc.wordPer(word,ad[2]*1)<BR>    ad[2]=ad[3]<BR>   }<BR>   else{<BR>    ad=/(\d+):(.+)/.exec(a)<BR>    ad[0]=lrc.wordPer(word,ad[1]-1)<BR>    ad[1]=lrc.wordPer(word,ad[1]*1)<BR>   }<BR>   len1+=(ad[1]-ad[0])*(ad[2]-1)<BR>   o.path.add(ad)<BR>  }<BR>  o.zoom=1/len1<BR> } <BR>}<BR>function browser_ini(){<BR> window.isIE=navigator.userAgent.indexOf("IE")&gt;0<BR> window.isIE5=navigator.userAgent.indexOf("IE 5.0")&gt;0<BR> String.prototype.trim=function(){return this.replace(/(^[\s]*)|([\s]*$)/g,"")}<BR> String.prototype.inc=function(s1,s2){if(s2==null){s2=","};return (s2+this+s2).indexOf(s2+s1+s2)&gt;-1?true:false}<BR> String.prototype._slice="".slice<BR> 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&amp;&amp;n1&lt;0&amp;&amp;n2==null?this._slice(this.length-1):eval("this._slice(n1"+(n2==null?"":","+n2)+")")}return v}<BR> 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)}<BR> Array.prototype.add=function(key){this[this.length]=key}<BR> window.oo=function(obj){return typeof(obj)=="string"?document.getElementById(obj)bj}<BR> 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)");}}<BR> window.odel=function(obj){if(oo(obj)!=null){oo(obj).parentNode.removeChild(oo(obj))}}<BR> if(!isIE){<BR>     HTMLElement.prototype.contains=function(node){if(!node)return false;do if(node==this){return true}while(node=node.parentNode){return false}}<BR>  Event.prototype.__defineGetter__("srcElement",function(){var node=this.target;while(node.nodeType!=1){node=node.parentNode}return node})<BR>  Event.prototype.__defineGetter__("toElement",function(){return this.relatedTarget})<BR> }<BR>}<BR>function timer_ini(){<BR> window.timer={}<BR> timer.handle=null<BR> timer.queue=""<BR> timer.i=0<BR> timer.add=function(key){if(!timer.queue.inc(key,";")){timer.queue+=key+";"}}<BR> timer.del=function(key){timer.queue=move.queue.replace(key+";","")}<BR> timer.inv=function(){<BR>  window.clearTimeout(timer.handle)<BR>  eval(timer.queue)<BR>  timer.i++<BR>  timer.handle=window.setTimeout("timer.inv()",10)<BR> }<BR> timer.inv()<BR>}<BR>function sortFoo(v1,v2){<BR>    var s1=v1.split("|")[sortIndex],s2=v2.split("|")[sortIndex]<BR>    if(!isNaN(s1)&amp;&amp;!isNaN(s2)){<BR>  s1*=1<BR>  s2*=1   }<BR> return (s1==s2?0:(s1&gt;s2?1:-1))*sortDir<BR>}<BR>&lt;/SCRIPT&gt;<BR>&lt;SCRIPT language=javascript&gt;<BR>function click() {if (event.button==2) {alert( '^_^ 谢谢欣赏 ^_^');}}document.onmousedown=click<BR>&lt;/SCRIPT&gt;</P>
<P>&lt;script language="JavaScript"&gt;</P>
<P>   var MESSAGE  =   " 影 音画 谢谢欣赏  "</P>
<P>   var POSITION = 150</P>
<P>   var DELAY    = 10</P>
<P>   var scroll = new statusMessageObject()</P>
<P> function statusMessageObject(p,d) {</P>
<P>  this.msg = MESSAGE</P>
<P>  this.out = " "</P>
<P>  this.pos = POSITION</P>
<P>  this.delay = DELAY</P>
<P>  this.i     = 0</P>
<P>  this.reset = clearMessage}</P>
<P>function clearMessage() {</P>
<P>  this.pos = POSITION}</P>
<P>function scroller() {</P>
<P>  for (scroll.i = 0; scroll.i &lt; scroll.pos; scroll.i++) {</P>
<P>    scroll.out += " "}</P>
<P>  if (scroll.pos &gt;= 0)</P>
<P>   scroll.out += scroll.msg</P>
<P>  else scroll.out = scroll.msg.substring(-scroll.pos,scroll.msg.length)</P>
<P>  window.status = scroll.out</P>
<P>  scroll.out = " "</P>
<P>  scroll.pos--</P>
<P>  if (scroll.pos &lt; -(scroll.msg.length)) {</P>
<P>   scroll.reset()}</P>
<P>  setTimeout ('scroller()',scroll.delay)}</P>
<P>function snapIn(jumpSpaces,position) {</P>
<P>  var msg = scroll.msg</P>
<P>  var out = ""</P>
<P>  for (var i=0; i&lt;position; i++) </P>
<P>    {out += msg.charAt(i)}</P>
<P>  for (i=1;i&lt;jumpSpaces;i++) </P>
<P>    {out += " "}</P>
<P>  out += msg.charAt(position)</P>
<P>  window.status = out</P>
<P>  if (jumpSpaces &lt;= 1) {</P>
<P>    position++</P>
<P>    if (msg.charAt(position) == ' ') </P>
<P>      {position++ }</P>
<P>    jumpSpaces = 100-position</P>
<P>  } else if (jumpSpaces &gt;  3)</P>
<P>       {jumpSpaces *= .75}</P>
<P>  else</P>
<P>    {jumpSpaces--}</P>
<P>  if (position != msg.length) {</P>
<P>    var cmd = "snapIn(" + jumpSpaces + "," + position + ")";</P>
<P>    scrollID = window.setTimeout(cmd,scroll.delay);</P>
<P>  } else {    window.status=""</P>
<P>    jumpSpaces=0</P>
<P>    position=0</P>
<P>    cmd = "snapIn(" + jumpSpaces + "," + position + ")";</P>
<P>    scrollID = window.setTimeout(cmd,scroll.delay);</P>
<P>    return false }</P>
<P>  return true}</P>
<P>snapIn(100,0);</P>
<P>&lt;/script&gt; </P>

签到天数: 2 天

[LV.1]初来乍到

鲜花(0) 鸡蛋(0)
发表于 2009-5-29 16:28 | 显示全部楼层
请高手们来帮忙回答下吧,傲雪姐姐他们应该都会。

该用户从未签到

鲜花(0) 鸡蛋(0)
发表于 2009-6-5 22:42 | 显示全部楼层
不知是不是将scrolling=no 改为scrolling=yes,楼主试试吧

该用户从未签到

鲜花(0) 鸡蛋(0)
发表于 2010-5-17 01:03 | 显示全部楼层
新来的 正在慢慢学习~

该用户从未签到

鲜花(0) 鸡蛋(0)
发表于 2010-5-17 10:35 | 显示全部楼层

回复 4# 的帖子

欢迎新朋友~
您需要登录后才可以回帖 登录 | 中文注册

本版积分规则

网站地图|小黑屋|Archiver|中画网 ( 蜀ICP备11021737号-2 )|网站地图

GMT+8, 2024-5-7 04:08 , Processed in 0.035031 second(s), 17 queries , MemCached On.

上网要文明 发言要理性

Powered by Discuz! © 2008-2023 YinHuaBBS.CN

快速回复 返回顶部 返回列表