웹마스터 팁

ActiveX control...

2002.05.11 11:55

☆봄비ㆀ

ActiveX 로 사람을 그려서 회전시키고, 크기 조정하고 할 수 있는데,

응용하면 이미지 안쓰고도 멋진 홈피를 만들 수 있겠져^^;


<html>
   <head>
    
      <script type = "text/javascript">
         <!--
         var speedX = 0;
         var speedY = 0;
         var speedZ = 0;
         var scale = 1;

         function start()
         {
            window.setInterval( "run()", 100 );
         }

         function run()      
         {
            drawing.Rotate( speedX, speedY, speedZ );
            drawing.Scale( scale, scale, scale );
         }

         function rotate( axis )
         {
            axis = ( axis ? 0 : 5 );
         }
         // -->
      </script>

   </head>

   <body onload = "start()">

      <div style = "position: absolute; top: 25; left: 220">
      <input type = "button" value = "Rotate-X"
         onclick = "speedX = ( speedX ? 0 : 5 )" /><br />
      <input type = "button" value = "Rotate-Y"
         onclick = "speedY = ( speedY ? 0 : 5 )" /><br />
      <input type = "button" value = "Rotate-Z"
         onclick = "speedZ = ( speedZ ? 0 : 5 )" /><br />
      <br />
      <input type = "button" value = "Scale Up"
         onclick = "scale = ( scale * 10 / 9 )" /><br />
      <input type = "button" value = "Scale Down"
         onclick = "scale = ( scale * 9 / 10 )" />
      </div>

      <object id = "drawing" style = " position: absolute;
         z-index: 2; width: 200; height: 300;"
         classid = "CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6">

         <param name = "Line0001" value = "SetFillColor( 0,0,0 )" />
         <param name = "Line0002" value = "SetFillStyle( 0 )" />
         <param name = "Line0003" value = "SetLineStyle( 1, 3 )" />
      
         <param name = "Line0004"
                value = "Oval( -25, -100, 50, 50, 0 )" />

         <param name = "Line0005"
            value = "PolyLine(2, 0, -50, 0, 50 )" />

         <param name = "Line0006"
            value = "PolyLine( 3, -30, -25, 0, -15, 30, -25 )" />

         <param name = "Line0007"
            value = "PolyLine( 3, -15, 90, 0, 50, 15, 90 )" />

         <param name = "Line0008"
            value = "SetFillColor ( 255, 0, 0 )" />
         <param name = "Line0009"
            value = "Oval( -15, -85, 7, 7, 0 )" />
         <param name = "Line0010"
            value = "Oval( 5, -85, 7, 7, 0 )" />

         <param name = "Line0011"
            value = "SetLineStyle( 1, 2 )" />
         <param name = "Line0012"
            value = "SetLineColor( 255, 0, 0 )" />
         <param name = "Line0013"
            value = "SetFont( 'Courier', 25, 200, 0, 0, 0 )" />
         <param name = "Line0014"
            value = "Text( 'Hello', -35, -115 , 0 )" />
      </object>

      <object id = "background" style = " position:absolute;
         z-index: 1; width: 200; height: 300;
         background-color: none" classid =
         "CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6">

         <param name = "Line0001"
            value = "SetFillColor( 38, 250, 38 )" />
         <param name = "Line0002"
            value = "Oval( -75, -125, 150, 250, 0 )" />
      </object>
   </body>
</html>