fg88

焦点幻灯片模板应用(fesend模板应用实例)


//==========  沙沙添加  =============

function imgSlides()
{
    
this.slides = new Array();
    
this.add = function(slide){
        
var i = this.slides.length;
        
this.slides[i] = slide;
    }

    
    
this.getPics = function(){

        
var pics = "";
        
for(var i=0;i<this.slides.length;i++)
        
{
            pics 
+= this.slides[i].pic+"|";
        }

        
if(pics.length>0)
        
{
            pics 
= pics.substring(0,pics.length-1);
        }

        
return pics;
    }

    
this.getLinks = function(){
        
var links = "";
        
for(var i=0;i<this.slides.length;i++)
        
{
            links 
+= this.slides[i].link+"|";
        }

        
if(links.length>0)
        
{
            links 
= links.substring(0,links.length-1);
        }

        
return links;
    }

    
this.getTexts = function(){
        
var texts = "";
        
for(var i=0;i<this.slides.length;i++)
        
{
            texts 
+= this.slides[i].text+"|";
        }

        
if(texts.length>0)
        
{
            texts 
= texts.substring(0,texts.length-1);
        }

        
return texts;
    }

}


function imgInfo(pic,link,text)
{
    
this.pic = pic;
    
this.link = link;
    
this.text = text;
}




ss 
= new imgSlides();

{loop table="news" loopnum="5" pid="5"}
= new imgInfo();
s.pic 
= "{$Photo}";
s.link 
= "{$Path}";
s.text 
= "{$ShowHead[10]}";
ss.add(s);
{/loop}

//==========沙沙添加结束=============


var focus_width=260
var focus_height=160
var text_height=20
var swf_height = focus_height+text_height

//======= 沙沙修改 =========
var pics = ss.getPics();
var links = ss.getLinks();
var texts = ss.getTexts();
//====== 沙沙修改结束 ======

document.write(\'
<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 +\'">\');
document.write(\'
<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="http://sports.qq.com/flash/playswf.swf"><param name=wmode value=transparent><param name="quality" value="high">\');
document.write(\'
<param name="menu" value="false"><param name=wmode value="opaque">\');
document.write(\'
<param name="FlashVars" value="pics=\'+pics+\'&links=\'+links+\'&texts=\'+texts+\'&borderwidth=\'+focus_width+\'&borderheight=\'+focus_height+\'&textheight=\'+text_height+\'">\');
document.write(\'
<embed src="http://sports.qq.com/flash/playswf.swf" wmode="opaque" FlashVars="pics=\'+pics+\'&links=\'+links+\'&texts=\'+texts+\'&borderwidth=\'+focus_width+\'&borderheight=\'+focus_height+\'&textheight=\'+text_height+\'" menu="false" bgcolor="#DADADA" quality="high" width="\'+ focus_width +\'" height="\'+ swf_height +\'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\');  document.write(\'</object>\');


 
<!-- --> 

分类:

技术点:

相关文章:

  • 2021-08-06
  • 2021-08-06
  • 2021-10-18
  • 2021-09-04
  • 2021-08-09
  • 2021-07-20
  • 2021-12-31
  • 2021-11-05
猜你喜欢
  • 2021-09-16
  • 2021-10-17
  • 2021-09-28
  • 2021-12-14
  • 2021-03-31
  • 2018-07-26
  • 2021-11-03
相关资源
相似解决方案