捕風(fēng)之巢

          統(tǒng)計(jì)

          留言簿(3)

          java友情鏈接

          閱讀排行榜

          評(píng)論排行榜

          實(shí)現(xiàn)圖片和flash的混合切換

          <html>
          <head>

          <script language='javascript'>
          function showitem(itemname,itemsrc,itemtype)
          {
          ?this.itemname=itemname;
          ?this.itemsrc=itemsrc;
          ?this.itemtype=itemtype;
          ?
          ?this.play=showplay;
          }
          function showplay()
          {
          ?if(this.itemtype=='img'){
          ??
          ?}else{
          ?
          ?}
          }
          function itemlist(){
          this.item1=new showitem("item1","1.gif","img");
          this.item2=new showitem("item2","pixviewer.swf","fla");
          this.item3=new showitem("item3","2.gif","img");
          this.item4=new showitem("item4","1.gif","img");
          this.item5=new showitem("item5","2.gif","img");
          this.size=5;
          }

          var mylist=new itemlist();
          mysize=mylist.size;
          count=1;


          function change_item()
          {
          var myitem = mylist['item'+count];
          var preitem ;
          if(count>1){
          ?preitem = mylist['item'+(count-1)];
          }else{
          ?preitem = mylist['item'+count];
          }

          if(myitem.itemtype=='img'){
          ?document.all('picdiv').style.backgroundImage='url('+preitem.itemsrc+')';
          ?
          ?document.pic.src=myitem.itemsrc;
          ?document.all('picdiv').style.display='';
          ?document.all('fladiv').style.display='none';

          ?pic.filters.revealTrans.Transition=6;
          ?pic.filters.item(0).apply()
          ?pic.style.visibility='visible'
          ?pic.filters.item(0).play()
          ?setTimeout("pic.style.visibility='hidden'",2000);
          }else{?
          ?document.all('fladiv').style.backgroundImage='url('+preitem.itemsrc+')';
          ?
          ?document.all('picdiv').style.display='none';
          ?document.all('fladiv').style.display='';
          ?
          }
          count++;
          if(count>mysize) count=1
          tt=setTimeout('change_item()',2000)
          }

          ?

          </script>

          </head>
          <body onload="change_item();">
          <table width="120" height="90"><tr><td>
          <div id="picdiv" name="picdiv" width="120" height="90">
          ?<img src='1.gif' id="pic" name="pic" width="120" height="90"? style='visibility:hidden;filter:revealtrans(duration=2.0,transition=0)'>
          ?
          </div>
          <div id="fladiv" name="fladiv" style="display:''" width="120" height="90">
          <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='/swflash.cab#version=6,0,0,0' width='120' height='90'>

          ??????? <param name=movie value='pixviewer.swf'>

          ??????? <param name=quality value=high>

          ??????? <embed src='pixviewer.swf' quality=high pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash type=application/x-shockwave-flash width='120' height='90'>

          ??????? </embed>

          </object>
          </div>
          </td>
          </tr>
          </table>

          </body>
          </html>

          posted on 2006-10-31 15:10 捕風(fēng) 閱讀(392) 評(píng)論(0)  編輯  收藏 所屬分類(lèi): web 頁(yè)面開(kāi)發(fā)

          主站蜘蛛池模板: 衡南县| 宜兰县| 安义县| 中牟县| 滨海县| 忻城县| 葵青区| 万载县| 昭通市| 伽师县| 大名县| 长海县| 四平市| 远安县| 丹巴县| 新野县| 肇庆市| 张家港市| 云霄县| 广昌县| 同心县| 扎囊县| 揭西县| 开远市| 桐城市| 长武县| 手游| 瑞昌市| 南郑县| 容城县| 上高县| 新乡市| 嵩明县| 三河市| 商都县| 诸暨市| 陇西县| 永胜县| 五华县| 汉沽区| 桃园县|