加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

NET中Flash+Xml焦点图片轮换

发布时间:2020-12-15 18:25:10 所属栏目:百科 来源:网络整理
导读:效果图: 下载地址: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/swfla

效果图:


下载地址: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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读