前台 aspx

 

 

 <script type="text/javascript" src="../Js/sinaflash.js"></script>    

 <table width="370" border="0" cellpadding="0" cellspacing="0" class="line11">
            <tr>
              <td height="290" align="center">
               <!-- 循环图片 -->
                                <div id="flashcontent1" style="width:360"></div>
                                <script type="text/javascript">
                
var sinaFlash1 = new sinaFlash("../Uploads/UserHousePics/EstatePic/Rotates/BasicFlash/nhpicture.swf""demo""360""260""8""#ffffff");
                sinaFlash1.addParam(
"quality""best");
                sinaFlash1.addParam(
"wmode""transparent");
                
//此处添图片信息等内容,用“|”分割,用“#”分割的部分分别代表图片地址,左侧按钮标题文字,左侧按钮消息文字,大图片的大标题文字,大图片的消息文字,大图片的连接地址!focusmovie.swf
                sinaFlash1.addVariable("mypic""<%=ShowPicString %>");
                sinaFlash1.write(
"flashcontent1");
                                
</script>
                                <!-- 循环图片结束 -->
                 </td>
            </tr>
          </table>

    

 

后台:

 

    public string ShowPicString = "";

    public void ReadRotatePics(int HID)
    {
        string sql = "select PID,bPic,yPath,mPath,Dpath,picmemo from EstatePhoto where EID = '" + HID + "' and PicCategory = '外景图'";
        DataSet ds = NewCommmonDb.CommonDataSet(sql);
        if (ds.Tables[0].Rows.Count > 0)
        {

            string picName = ""//原图
            string yPath = ""//
            string mPath = ""//
            string dPath = ""//
            string picMemo = ""//说明
            string picLink = "RotatePicDetail.aspx?id=";

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                picid = ds.Tables[0].Rows[i][0].ToString(); //PID
                picName = ds.Tables[0].Rows[i][1].ToString(); //原图
                yPath = ds.Tables[0].Rows[i][2].ToString(); //
                mPath = ds.Tables[0].Rows[i][3].ToString(); //
                dPath = ds.Tables[0].Rows[i][4].ToString(); //
                picMemo = ds.Tables[0].Rows[i][5].ToString(); //说明


                ShowPicString += "../Uploads/UserHousePics/EstatePic/Rotates/RotatePics/NewHousePics/" + yPath + "/" + mPath + "/" + dPath + "/" + picName + "#" + picMemo + "#" + picLink + picid + "|";

            }

            ShowPicString = ShowPicString.TrimEnd('|');

        }
        else
        {
            ShowPicString = "../Uploads/UserHousePics/EstatePic/Rotates/RotatePics/NewHousePics/001.jpg#暂无图##";
        }
        
    }

  

 

 Js/sinaflash.js  下载 /Files/tiger8000/sinaflash.js.txt

 

 

 /**
  * @author [sina]zhangping1@
  * @version v1.1.3
  * Date:2006-9-8 2006-12-15
  
*/
if(typeof(sina)!="object"){var sina={};}
sina.$=function(objId){if(!objId){throw new Error("sina.$(String objId)参数必须")}
if(document.getElementById){return eval('document.getElementById("'+objId+'")')}else if(document.layers){return eval("document.layers['"+objId+"']")}else{return eval('document.all.'+objId)}}
sinaFlash=function(C,v,x,V,c,X,i,O,I,l,o){var z=this;if(!document.createElement||!document.getElementById){return}
z.id=v?v:"";z.class){i.innerHTML=I.getFlashHtml();}}}

 

 

 

---

结束

 注意事项:

 sinaflash.js 文件 有时候会出现  'sinaflash' 未定义的错误,这种情况是这样的:

用vs.net2008 打开  sinaflash.js 文件 ,然后,另存为---“保存”旁边有一个向下的小箭头,选 “编码保存”,然后,选择 “UTF-8” ,保存即可。

 

相关文章:

  • 2022-12-23
  • 2021-11-26
  • 2021-12-12
  • 2022-12-23
  • 2021-08-15
  • 2022-02-05
  • 2021-12-24
猜你喜欢
  • 2021-06-19
  • 2022-02-18
  • 2022-02-27
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案