效果图:
Flash文件见附件。
【调用方法】
{$MY_Flash幻灯片(1,3,350,250,30)}
说明:
1 :频道ID为1
3 :调用3条记录
350 :宽度
250 :高度
30 :标题长度
注意:此处调用的文章为带图片的推荐文章,不推荐的不会调用
【SQL语句】
select top {input(1)} ArticleID,ChannelID,Title,DefaultPicUrl from PE_Article Where ChannelID = {input(0)} And Status =3 and DefaultPicUrl like '%.jpg' and Deleted=0 order by ArticleID desc
【参数列表】
频道ID
调用数量
Flash宽度
Flash高度
标题长度
【循环语句】
<script language="javascript">
var swf_width = {input(2)};
var swf_height = {input(3)};
var files = ""; //图片地址
var links = ""; //连接地址
var texts = ""; //介绍性文字
{Loop}
{Infobegin}
files = files == "" ? "{$InstallDir}{$Field(1,GetChannel,1)}/{$Field(1,GetChannel,3)}/{$Field(3,Text,0,0,0)}" : files "|" "{$InstallDir}{$Field(1,GetChannel,1)}/{$Field(1,GetChannel,3)}/{$Field(3,Text,0,0,0)}"
links = links == "" ? "{$InstallDir}{$Field(0,GetUrl,Article,1)}" : links "|" "{$InstallDir}{$Field(0,GetUrl,Article,1)}"
texts = texts == "" ? "{$Field(2,Text,{input(4)},1,0)}" : texts "|" "{$Field(2,Text,{input(4)},1,0)}"
{Infoend}
{/Loop}
document.writeln('<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="' swf_width '" height="' swf_height '">');
document.writeln('<param name="movie" value="{$InstallDir}Skin/sw86/bcastr31.swf"><param name="quality" value="high">');
document.writeln('<param name="menu" value="false"><param name=wmode value="opaque">');
document.writeln('<param name="FlashVars" value="bcastr_file=' files '&bcastr_link=' links '&bcastr_title=' texts '">');
document.writeln('<embed src="{$InstallDir}Skin/sw86/bcastr31.swf" wmode="opaque" FlashVars="bcastr_file=' files '&bcastr_link=' links '&bcastr_title=' texts '& menu="false" quality="high" width="' swf_width '" height="' swf_height '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.writeln('</object>');
</script>
新闻热点
疑难解答
图片精选