捕風之巢

          統計

          留言簿(3)

          java友情鏈接

          閱讀排行榜

          評論排行榜

          實現圖片和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 捕風 閱讀(397) 評論(0)  編輯  收藏 所屬分類: web 頁面開發

          主站蜘蛛池模板: 桐庐县| 屯留县| 文水县| 晋城| 洱源县| 图片| 沙洋县| 长乐市| 瓦房店市| 克拉玛依市| 广西| 新蔡县| 宣城市| 手游| 云阳县| 天门市| 金乡县| 新巴尔虎右旗| 兰溪市| 哈尔滨市| 东安县| 滦平县| 平顺县| 湘西| 黄龙县| 满城县| 翁牛特旗| 磐安县| 兴和县| 垣曲县| 赫章县| 井研县| 江永县| 海伦市| 贵定县| 黄浦区| 罗山县| 沈阳市| 德州市| 富源县| 同德县|