解析Flash幻灯片函数标签_动易Cms教程

编辑Tag赚U币
教程Tag:暂无Tag,欢迎添加,赚取U币!

效果图:

图片点击可在新窗口打开查看

 

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>

查看更多 动易Cms教程  动易Cms模板

来源:模板无忧//所属分类:动易Cms教程/更新时间:2009-08-25
相关动易Cms教程