主题:关于网页切换显示几幅flash动画的问题
我初学asp,在网上下载了一套ASP网站程序,自已试验性的修改。代码如下:
<div align="center">
<script type="text/javascript">
<!--
var focus_width=980
var focus_height=250
var text_height=0
var swf_height = focus_height+text_height
<%
set rs_ad=server.createobject("ADODB.Recordset")
rs_ad.open "select top 6 * from News where DefaultPicUrl<>'' And Ok=True and BigClassID=302 Order By AddDate desc,ID desc",conn,1,1
T_images=""
T_links=""
i=1
do while not rs_ad.eof
if i=1 then
T_images=rs_ad("DefaultPicUrl")
T_links="china/show.asp?ID="&rs_ad("ID")
T_texts=gotTopic(rs_ad("title"),28)
else
T_images=T_images&"|"&rs_ad("DefaultPicUrl")
T_links=T_links&"|"&"/china/show.asp?ID="&rs_ad("ID")
T_texts=T_texts&"|"&gotTopic(rs_ad("title"),28)
end if
i=i+1
rs_ad.movenext
if rs_ad.eof then exit do
loop
rs_ad.close
%>
var pics='<%=T_images%>'
var links='<%=T_links%>'
var texts='<%=T_texts%>'
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="vf/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#cccccc" >');
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="vf/focus.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#cccccc" 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>');
//-->
</script>
</div>
问题是这样的,我共上传了4幅flash动画文件,这4幅动画文件大小相同(都是980*250),可为什么在切换显示时,有的能完全显示,而有的不能完全显示呢?
<div align="center">
<script type="text/javascript">
<!--
var focus_width=980
var focus_height=250
var text_height=0
var swf_height = focus_height+text_height
<%
set rs_ad=server.createobject("ADODB.Recordset")
rs_ad.open "select top 6 * from News where DefaultPicUrl<>'' And Ok=True and BigClassID=302 Order By AddDate desc,ID desc",conn,1,1
T_images=""
T_links=""
i=1
do while not rs_ad.eof
if i=1 then
T_images=rs_ad("DefaultPicUrl")
T_links="china/show.asp?ID="&rs_ad("ID")
T_texts=gotTopic(rs_ad("title"),28)
else
T_images=T_images&"|"&rs_ad("DefaultPicUrl")
T_links=T_links&"|"&"/china/show.asp?ID="&rs_ad("ID")
T_texts=T_texts&"|"&gotTopic(rs_ad("title"),28)
end if
i=i+1
rs_ad.movenext
if rs_ad.eof then exit do
loop
rs_ad.close
%>
var pics='<%=T_images%>'
var links='<%=T_links%>'
var texts='<%=T_texts%>'
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="vf/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#cccccc" >');
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="vf/focus.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#cccccc" 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>');
//-->
</script>
</div>
问题是这样的,我共上传了4幅flash动画文件,这4幅动画文件大小相同(都是980*250),可为什么在切换显示时,有的能完全显示,而有的不能完全显示呢?