您的位置:首页 > 编程语言 > ASP

asp动态FLASH焦点图片

2008-03-20 17:41 295 查看
 

<!--#include file="Inc/syscode.asp"--><html>

<head>

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

<meta name="Copyright" content="懒人图库 http://www.makewing.com/" />

<meta name="description"
content="学会偷懒,并懒出境界是提高工作效率最有效的方法!"
/>

<meta content="懒人图库" name="keywords" />

<title>懒人图库</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=0; //是否显示文字标签 1显示 0不显示

var txtcolor="000000"; //文字色

var bgcolor="DDDDDD"; //背景色

var imag=new Array();

var link=new Array();

var text=new Array();

 //可编辑内容开始(可放置特版中)

  

  

  var imag=new Array();

  var link=new Array();

  var text=new Array();

<%

 dim rshp,sqlhp,hp

 Set rshp=
Server.CreateObject("ADODB.Recordset")

 sqlhp = "select top 5 * from Product where
Passed=True and Elite=true order by UpdateTime desc"

 hp=1

 rshp.open sqlhp,conn,1,1

 do while not rshp.eof%>

  imag[<%=hp%>]="<%=rshp("DefaultPicUrl")%>";

  link[<%=hp%>]="ArticleShow.asp?ID=<%=rshp("ArticleID")%>";

  text[<%=hp%>]="<%=rshp("Title")%>";

<%

 hp=hp+1

 

 rshp.movenext

 loop

 rshp.close

%>

  

  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);

//可编辑内容结束

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><br>转载请注明出处:<a
href="http://www.makewing.com/"
target="_blank">懒人图库</a>

</div>

</body>

</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: