我从网上下了一个JS+FLASH广告轮显的代码!!!!
运行正常~~~~但是标题更改无效~~~imag[1]="images/01.jpg";
link[1]="http://www.17flash8.net/";
text[1]="标题 1";
imag[2]="images/02.jpg";
link[2]="http://www.17flash8.net/";
text[2]="标题 2";
imag[3]="images/03.jpg";
link[3]="http://www.17flash8.net/";
text[3]="标题 3";
imag[4]="images/04.jpg";
link[4]="http://www.17flash8.net/";
text[4]="标题 4";
imag[5]="images/05.jpg";
link[2]="http://www.17flash8.net/";
text[5]="标题 5";text[1]到text[4]..更改无效只有text[5]可以更改。。其余的始终显示的是某一个网站的名称。
谁能教我下,怎么改吗~~~~~~谢谢!!
源代码如下!!!!<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="description" content="一起闪吧_Flash源码_Flash小游戏_Flash教程_Flash精品欣赏" />
<meta content="js代码,flash源码,flash,css,下载,源码下载" name="keywords" />
<title>Flash+JS焦点图片随机切换源码(5图)_一起闪吧(www.17flash8.net)</title>
</head><body>
<div align="center">
<script type=text/javascript>
var pic_width=395; //图片宽度
var pic_height=265; //图片高度
var button_pos=4; //按扭位置 1左 2右 3上 4下
var stop_time=3000; //图片停留时间(1000为1秒钟)
var show_text=1; //是否显示文字标签 1显示 0不显示
var txtcolor="000000"; //文字色
var bgcolor="DDDDDD"; //背景色
var imag=new Array();
var link=new Array();
var text=new Array();
imag[1]="images/01.jpg";
link[1]="http://www.17flash8.net/";
text[1]="标题 1";
imag[2]="images/02.jpg";
link[2]="http://www.17flash8.net/";
text[2]="标题 2";
imag[3]="images/03.jpg";
link[3]="http://www.17flash8.net/";
text[3]="标题 3";
imag[4]="images/04.jpg";
link[4]="http://www.17flash8.net/";
text[4]="标题 4";
imag[5]="images/05.jpg";
link[2]="http://www.17flash8.net/";
text[5]="标题 5";
//可编辑内容结束
var swf_height=show_text==1?pic_height+20:pic_height;
var pics="", links="", texts="";
for(var i=1; i<imag.length; i++){
pics=pics+("|"+imag[i]);
links=links+("|"+link[i]);
texts=texts+("|"+text[i]);
}
pics=pics.substring(1);
links=links.substring(1);
texts=texts.substring(1);
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cabversion=6,0,0,0" width="'+ pic_width +'" height="'+ swf_height +'">');
document.write('<param name="movie" value="flash/focus.swf">');
document.write('<param name="quality" value="high"><param name="wmode" value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&pic_width='+pic_width+'&pic_height='+pic_height+'&show_text='+show_text+'&txtcolor='+txtcolor+'&bgcolor='+bgcolor+'&button_pos='+button_pos+'&stop_time='+stop_time+'">');
document.write('<embed src="flash/focus.swf" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&pic_width='+pic_width+'&pic_height='+pic_height+'&show_text='+show_text+'&txtcolor='+txtcolor+'&bgcolor='+bgcolor+'&button_pos='+button_pos+'&stop_time='+stop_time+'" quality="high" width="'+ pic_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
</script>
<br>
</div>
</body>
</html>

解决方案 »

  1.   

    http://www.pyjjjc.gov.cn/
    重新搞一个!
    <span id="flash_focus"></span>
                  <script type="text/javascript">
    var imgUrl = Array()
    var imgtext = Array()
    var imgLink = Array()
     
     
    imgUrl[imgUrl.length]="upload/images/news_pic2/2010-04-20/1279676582.jpg.jpg"
    imgtext[imgtext.length]="确保亚运筹办工作不留污点"
    imgLink[imgLink.length]=escape("column.php?cid=15&id=383")
     
    imgUrl[imgUrl.length]="upload/images/news_pic2/2010-02-24/1275775940.jpg.jpg"
    imgtext[imgtext.length]="不断提高反腐倡廉建设科学化水..."
    imgLink[imgLink.length]=escape("column.php?cid=15&id=373")
     
    imgUrl[imgUrl.length]="upload/images/news_pic2/2010-01-08/1271229417.jpg.jpg"
    imgtext[imgtext.length]="区纪委监察局召开中心组学习会..."
    imgLink[imgLink.length]=escape("column.php?cid=15&id=360")
     
    imgUrl[imgUrl.length]="upload/images/news_pic2/2010-01-06/1271472516.jpg.jpg"
    imgtext[imgtext.length]="拒腐防变   警钟长鸣"
    imgLink[imgLink.length]=escape("column.php?cid=17&id=358")
     
    imgUrl[imgUrl.length]="upload/images/news_pic2/2009-12-25/1269148169.jpg.jpg"
    imgtext[imgtext.length]="深入推进反腐败工作"
    imgLink[imgLink.length]=escape("column.php?cid=15&id=355")
     
     
    var focus_width=220
    var focus_height=160
    var text_height=20
    var swf_height = focus_height+text_height
     
    var pics=imgUrl.join("|")
    var links=imgLink.join("|")
    var texts=imgtext.join("|")
     
    var html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">'
    html += '<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">'
    html += '<param name="menu" value="false"><param name=wmode value="opaque">'
    html += '<param name="wmode" value="transparent" />'
    html += '<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">'
    html += '<embed wmode="transparent" flashvars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" src="images/focus.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ focus_width +'" height="'+ swf_height +'" />'
    html += '</object>'
    document.getElementById("flash_focus").innerHTML = html
            </script>
      

  2.   

    http://www.pyjjjc.gov.cn/images/focus.swf 下载这个放到 images/focus.swf
      

  3.   

    http://www.lanrentuku.com/js/p1.html
    这上面好多   
      

  4.   


    jianye112。。按照你的提示,已经下载了你给的SWF文件,并放在了对应的文件中,结果还是不行。。我把现在的代码 贴出来,你看看是不是哪里还没有改到呢~<html>
    <head>
    </head><body>
    <div align="center">
    <script language="javascript" >var imgUrl = Array()
    var imgtext = Array()
    var imgLink = Array()
     
     
    imgUrl[imgUrl.length]="images/01.jpg"
    imgtext[imgtext.length]="确保亚运筹办工作不留污点"
    imgLink[imgLink.length]=escape("column.php?cid=15&id=383")
     
    imgUrl[imgUrl.length]="images/01.jpg"
    imgtext[imgtext.length]="不断提高反腐倡廉建设科学化水..."
    imgLink[imgLink.length]=escape("column.php?cid=15&id=373")
     
    imgUrl[imgUrl.length]="images/01.jpg"
    imgtext[imgtext.length]="区纪委监察局召开中心组学习会..."
    imgLink[imgLink.length]=escape("column.php?cid=15&id=360")
     
    imgUrl[imgUrl.length]="images/01.jpg"
    imgtext[imgtext.length]="拒腐防变   警钟长鸣"
    imgLink[imgLink.length]=escape("column.php?cid=17&id=358")
     
    imgUrl[imgUrl.length]="images/01.jpg"
    imgtext[imgtext.length]="深入推进反腐败工作"
    imgLink[imgLink.length]=escape("column.php?cid=15&id=355")
     
     
    var focus_width=220
    var focus_height=160
    var text_height=20
    var swf_height = focus_height+text_height
     
    var pics=imgUrl.join("|")
    var links=imgLink.join("|")
    var texts=imgtext.join("|")
     
    var html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">'
    html += '<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">'
    html += '<param name="menu" value="false"><param name=wmode value="opaque">'
    html += '<param name="wmode" value="transparent" />'
    html += '<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">'
    html += '<embed wmode="transparent" flashvars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" src="images/focus.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ focus_width +'" height="'+ swf_height +'" />'
    html += '</object>'
    document.getElementById("flash_focus").innerHTML = html</script>
    <br>
    </div>
    </body>
    </html>
      

  5.   

    <span id="flash_focus"></span>
    你这行没写上啊!!!! (document.getElementById("flash_focus").innerHTML = html)