微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

NET中Flash+Xml焦点图片轮换

效果图:


下载地址:http://download.csdn.net/detail/tiz198183/4778086

一、网页

     <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id=scriptmain name=scriptmain codebase="http://download.macromedia.com/pub/shockwave/cabs/
flash/swflash.cab#version=6,29,0" width="300" height="261">
      <param name="movie" value="FlashXml/Flash/bcastr.swf?bcastr_xml_url=FlashXml/bcastrXML.ashx">
      <param name="quality" value="high">
      <param name=scale value=noscale>
      <param name="LOOP" value="false">
      <param name="menu" value="false">
      <param name="wmode" value="transparent">
      <embed src="FlashXml/Flash/bcastr.swf?bcastr_xml_url=FlashXml/bcastrXML.ashx" width="300" height="261" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" salign="T" name="scriptmain" menu="false" wmode="transparent"></embed>
    </object>

二、处理页面

<%@ WebHandler Language="C#" Class="bcastrXML" %>

using System;
using System.Web;
using System.Data;
using BLL;
public class bcastrXML : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        DataTable dt = News.GetList(" and path<>''").Tables[0];
        context.Response.Write("<?xml version='1.0'  encoding='utf-8' ?><bcaster autoplayTime='3'>");
        for (int i = 0; i < 9; i++)
        {
            context.Response.Write("<item item_url='" + dt.Rows[i]["path"] + "'  link='http://'  itemtitle=''></item>");
        }
        context.Response.Write("</bcaster>");
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}


实例2:

效果


代码地址:http://download.csdn.net/detail/tiz198183/4763549

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐