• MVC3 js+flash图片滚动


    @model List<Advertising>
    @{
        ViewBag.Title = "AdList";
        Layout = null;
        var pics1="";
        var links1 = "";
        var FlashVars1 = "";
    }
    @for(var i=0;i<Model.Count;i++)
    {
         pics1 += Model[i].ImageUrl+"|";
         links1 += Model[i].LinkUrl+"|";
    }
    @{FlashVars1 = "pics=" + pics1 + links1 + "&amp;texts=&amp;borderwidth=307&amp;borderheight=258&amp;textheight=0";}
    <script type="text/javascript">
        $(function () {
            $("embed").attr("flashvars", $("#hiddenFlash").val())
        })
    </script>
    <input type="hidden" value="@FlashVars1" id="hiddenFlash" />
    <input type="hidden" value="@pics1" id="hiddenpic" />
    <input type="hidden" value="@links1" id="hiddenlink" />
    <div class="kv">
            <!-- matrix: 1103 city: all time:2013-03-23 21:53:21-->
            <script type="text/javascript">
                var focus_width = 380
                var focus_height = 226
                var focus_width2 = focus_width + 2
                var focus_height2 = focus_height + 2
                var text_height = 0
                var swf_height = focus_height + text_height
                var pics = $("#hiddenpic").val().substring(0, $("#hiddenpic").val().length - 1)
                var links = $("#hiddenlink").val()
                var texts = ""
    
                var flashCode = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/hotdeploy/flash/swflash.cab#version=6,0,0,0" width="' + focus_width + '" height="' + swf_height + '">';
                flashCode = flashCode + '<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="http://image.ledu.com/jjsg/swf/focus2.swf"><param name="quality" value="high"><param name="wmode" value="transparent">';
                flashCode = flashCode + '<param name="menu" value="false">';
                flashCode = flashCode + '<param name="FlashVars" value="pics=' + pics + '&links=' + links + '&texts=' + texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '">';
                flashCode = flashCode + '<embed src="http://image.ledu.com/jjsg/swf/focus2.swf" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + focus_width + '" height="' + swf_height + '" FlashVars="pics=' + pics + '&links=' + links + '&texts=' + texts + '&borderwidth=' + focus_width2 + '&borderheight=' + focus_height2 + '&textheight=' + text_height + '"></embed>';
                flashCode = flashCode + '</object>';
                document.write(flashCode);</script>
            <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/hotdeploy/flash/swflash.cab#version=6,0,0,0"
                height="226" width="380">
                <param name="allowScriptAccess" value="sameDomain">
                <param name="movie" value="http://image.ledu.com/jjsg/swf/focus2.swf">
                <param name="quality" value="high">
                <param name="wmode" value="transparent">
                <param name="menu" value="false">
                <param name="FlashVars" value="pics=http://pic.ledu.com/image/source/2013/3/14/142471_c6119.jpg|http://uppic.ledu.com/image/source/2013/2/13/135391_561e3.jpg&amp;links=http://jjsg.ledu.com/gonggao/11772.html|http://jjsg.ledu.com/card|&amp;texts=&amp;borderwidth=305&amp;borderheight=256&amp;textheight=0">
                <embed src="http://image.ledu.com/jjsg/swf/focus2.swf" wmode="transparent" quality="high"
                    pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"
                     flashvars="pics=;texts=&amp;borderwidth=307&amp;borderheight=258&amp;textheight=0"
                    height="226" width="380"></object>
            <!-- end matrix: 1103-->
        </div>
    View Code
  • 相关阅读:
    关于参数,集合的演示
    Process
    常见的IT 日语
    C#格式化数值
    提高C#编程水平的50个要点
    .net中C#代码与javaScript函数的相互调用问题
    Rundll32.exe
    徐家骏:我在华为工作十年的感悟
    转换人民币大小金额
    29个Ajax Javascript相册资源
  • 原文地址:https://www.cnblogs.com/douqiumiao/p/3096540.html
Copyright © 2020-2023  润新知