
花香7.6版首页幻灯片不能显示

悬赏分:
5 - 提问时间:2008-6-19 22:28:14
问题为何被关闭 - 阅读次数:
下面是花香7.6版首页幻灯片的代码,不知为什么在首页显示不了幻灯片,不知是哪里出错了
Function FlashNews(num,fontnum,PicWidthStr,PicHeightStr,BGcolor,txtheight)
Dim RsFilterObj,FlashStr,ImagesStr,TxtStr,LinkStr
FilterSql = "SELECT top "&num&" * FROM news where isimg=1 and images<>'''' ORDER BY news_id DESC"
Set RsFilterObj = Conn.Execute(FilterSql)
If not RsFilterObj.Eof then
Dim Temp_Num
Temp_Num = 0
Do While Not RsFilterObj.Eof
Temp_Num = Temp_Num + 1
RsFilterObj.MoveNext
Loop
RsFilterObj.MoveFirst
If Temp_Num <=1 then
Set RsFilterObj = Nothing
FlashNews = "至少需要两条幻灯新闻才能正确显示幻灯效果"
Set RsFilterObj = Nothing
Exit Function
End If
do while Not RsFilterObj.Eof
if ImagesStr = "" then
ImagesStr = RsFilterObj("images")
TxtStr = gotTopic(RsFilterObj("news_title"),fontnum)
LinkStr = "shownews.asp?news_id="&RsFilterObj("news_id")
else
ImagesStr = ImagesStr &"|"& RsFilterObj("images")
TxtStr = TxtStr & "|" & gotTopic(RsFilterObj("news_title"),fontnum)
LinkStr = LinkStr & "|" & "shownews.asp?news_id="& RsFilterObj("news_id")
end if
RsFilterObj.MoveNext
loop
FlashStr="<script type=""text/javascript"">"& Chr(13)
FlashStr=FlashStr&"<!--"& Chr(13)
FlashStr=FlashStr&"var focus_width="&PicWidthStr& Chr(13)
FlashStr=FlashStr&"var focus_height="&PicHeightStr& Chr(13)
FlashStr=FlashStr&"var text_height="&txtheight& Chr(13)
FlashStr=FlashStr&"var swf_height = focus_height+text_height"& Chr(13)
FlashStr=FlashStr&"var pics=''"&ImagesStr&"''"&Chr(13)
FlashStr=FlashStr&"var links=''"&LinkStr &"''"&Chr(13)
FlashStr=FlashStr&"var texts=''"&TxtStr&"''"&Chr(13)
FlashStr=FlashStr&"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 +''"">'');"&Chr(13)
FlashStr=FlashStr&"document.write(''<param name=""allowScriptAccess"" value=""sameDomain""><param name=""movie"" value=""img/pic.swf""><param name=""quality"" value=""high""><param name=""bgcolor"" value="&BGcolor&">'');"&Chr(13)
FlashStr=FlashStr&"document.write(''<param name=""menu"" value=""false""><param name=wmode value=""opaque"">'');"&Chr(13)
FlashStr=FlashStr&" document.write(''<param name=""FlashVars"" value=""pics=''+pics+''&links=''+links+''&texts=''+texts+''&borderwidth=''+focus_width+''&borderheight=''+focus_height+''&textheight=''+text_height+''"">'');"&Chr(13)
FlashStr=FlashStr&"document.write(''<embed src=""img/pic.swf"" wmode=""opaque"" FlashVars=""pics=''+pics+''&links=''+links+''&texts=''+texts+''&borderwidth=''+focus_width+''&borderheight=''+focus_height+''&textheight=''+text_height+''"" menu=""false"" bgcolor="&BGcolor&" quality=""high"" width=""''+ focus_width +''"" height=""''+ swf_height +''"" allowScriptAccess=""sameDomain"" type=""application/x-shockwave-flash"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" />'');"&Chr(13)
FlashStr=FlashStr&"document.write(''</object>'');"&Chr(13)
FlashStr=FlashStr&"//-->"& Chr(13)
FlashStr=FlashStr&"</script>"
else
FlashStr="没有幻灯图片"
end if
RsFilterObj.Close
Set RsFilterObj = Nothing
FlashNews= FlashStr
End Function