在網頁里用一個DIV和一個JS的計時時間來達到動態控制flash舞臺的效果。另外,可在flash里加入actionscript來配合:
          _root._xscale=int(300);
          _root._yscale=int(300);
          網頁里的代碼:

          <html>
          <script language="JavaScript" type="text/JavaScript">
          <!--
          function MM_reloadPage(init) {  //reloads the window if Nav4 resized
            if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
              document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
            else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
          }
          MM_reloadPage(true);
          //-->
          </script>
          <div id="Layer1" style="position:absolute; left:600px; top:15px; width:200px; height:200px; z-index:0; overflow: visible;">
            <object  id="tt1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"   codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"   width="200"   height="200">
              <param   name="movie"   value="test.swf">
              <param   name="quality"   value="high">
              <embed   src="test.swf"   quality="high"   pluginspage="http://www.macromedia.com/go/getflashplayer"   type="application/x-shockwave-flash"   width="200"   height="200"  ></embed>
            </object>
          </div>
          <p>
              <INPUT   onclick="setSize()"   type="button"   value="setSize">  
              <SCRIPT   LANGUAGE="JavaScript">  
            <!--  
            function   setSize()  
            {  
            document.getElementById("tt1").width=600;  
            document.getElementById("tt1").height=600;  
              document.getElementById("Layer1").style.left=100; 
           document.getElementById("Layer1").style.top=15;
            document.getElementById("Layer1").width=600;  
            document.getElementById("Layer1").height=600;
            }  
              function   setSize2()  
            {  
            document.getElementById("tt1").width=200;  
            document.getElementById("tt1").height=200;  
              document.getElementById("Layer1").style.left=600; 
           document.getElementById("Layer1").style.top=15;
            document.getElementById("Layer1").width=200;  
            document.getElementById("Layer1").height=200;
            }  
            //--> 
          function timedMsg()
           {
           var t=setTimeout("setSize()",5000)
            var t2=setTimeout("setSize2()",10000)
           }

            </SCRIPT>
          </p>
          <body onLoad="timedMsg()">
          <table width="951" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="698" height="71" bgcolor="#00FF66">&nbsp;</td>
              <td width="253">&nbsp;</td>
            </tr>
          </table>
          <p>&nbsp; </p>
          </body>
          </html>

          posted on 2007-12-13 17:22 lzj520 閱讀(1250) 評論(0)  編輯  收藏 所屬分類: 個人學習日記Ria
          主站蜘蛛池模板: 龙江县| 建阳市| 陆河县| 鹤岗市| 武宁县| 双峰县| 施甸县| 重庆市| 苍南县| 开封县| 金华市| 外汇| 黄陵县| 和顺县| 噶尔县| 义乌市| 鲜城| 南城县| 沙湾县| 怀远县| 静乐县| 竹溪县| 富蕴县| 鄂托克前旗| 凌海市| 津市市| 湘西| 木里| 广平县| 定州市| 长海县| 宜兴市| 玉山县| 秭归县| 荥阳市| 温州市| 榆社县| 叙永县| 浮梁县| 湖州市| 丁青县|