<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; HTML: пример работы с VML]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=1979</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=1979&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «HTML: пример работы с VML».]]></description>
		<lastBuildDate>Sat, 19 Jul 2008 08:54:51 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[HTML: пример работы с VML]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=12717#p12717</link>
			<description><![CDATA[<p>В примере рисуется трёхмерный кубик с применением освещения. Управляется мышкой. Zoom-ить и менять цвет можно кнопками.<br /><strong>cube.htm</strong><br /></p><div class="codebox"><pre><code>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;!-- saved from url=(0040)http://b.domaindlx.com/Xameleon/CUBE.htm --&gt;
&lt;HTML xmlns:v = &quot;urn:schemas-microsoft-com:vml&quot; xmlns:o = 
&quot;urn:schemas-microsoft-com:office:office&quot;&gt;&lt;HEAD&gt;
&lt;META http-equiv=Content-Type content=&quot;text/html; charset=windows-1251&quot;&gt;
&lt;SCRIPT language=vbscript&gt;
Dim RA,X,Y,KX,KY,TM,DRAW

Sub Document_onmousemove()
    On error resume next
    DRAW=1
    x=int(window.event.x/kx)
    y=int(window.event.y/ky)
    RA=y+90 &amp; &quot;,&quot; &amp; x-90
    EXT.rotationangle=RA
End sub

Sub SC(C)
    select case C
    case &quot;wireframe&quot;
        EXT.render=C
        SP.color2=&quot;#ffffff&quot;
    case else
        SP.color2=&quot;fill darken(2)&quot;
        EXT.render=&quot;solid&quot;
        RECT.fillcolor=C
    end select
End sub

Sub INFO
    on error resume next
    cleartimeout TM
    TM=window.settimeout(&quot;INFO&quot;,100)
    if draw then
        xb.style.width=-x/2
        yb.style.width=-y/2
        draw=false 
    End if
End sub

Sub Setup(SIZE)
    with RECT.style
    .width=SIZE &amp; &quot;pt&quot;
    .height=SIZE &amp; &quot;pt&quot;
    End with
    with shadow.style
    .marginleft=-size
    .width=size*3.3
    .height=size/3
    .margintop=size*2
    End with
    EXT.backdepth=SIZE
    INFO
End sub

Sub Window_onresize
    KX=-document.body.offsetwidth/180
    KY=-document.body.offsetheight/180
End sub

Sub window_onload
    On error resume next
    setup(&quot;20&quot;)
    window_onresize
End sub

Sub window_onunload
    cleartimeout TM
End sub

&lt;/SCRIPT&gt;

&lt;STYLE&gt;
v\:* {
    BEHAVIOR: url(#default#VML)
}
o\:* {
    BEHAVIOR: url(#default#VML)
}
BODY {
    FONT-SIZE: 9px; FONT-FAMILY: Verdana
}
TD {
    FONT-SIZE: 9px; FONT-FAMILY: Verdana
}
INPUT {
    FONT-SIZE: 9px; FONT-FAMILY: Verdana
}
INPUT {
    BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 20px; BORDER-BOTTOM: black 1px solid; HEIGHT: 16px; BACKGROUND-COLOR: #ffffff
}
&lt;/STYLE&gt;

&lt;META content=&quot;MSHTML 6.00.2900.2180&quot; name=GENERATOR&gt;&lt;/HEAD&gt;
&lt;BODY bottomMargin=0 leftMargin=11 topMargin=0 rightMargin=11&gt;
&lt;TABLE height=&quot;100%&quot; cellSpacing=0 cellPadding=2 width=&quot;100%&quot;&gt;
  &lt;TBODY&gt;
  &lt;TR&gt;
    &lt;TD align=middle width=&quot;100%&quot; colSpan=2 height=&quot;100%&quot;&gt;
    &lt;V:RECT id=RECT style=&quot;Z-INDEX: 3; POSITION: absolute&quot; coordsize=&quot;21600,21600&quot;&gt;&lt;O:EXTRUSION id=&quot;EXT&quot; type = &quot;perspective&quot; on = &quot;t&quot; 
      lightposition2 = &quot;0,50000&quot; lightposition = &quot;0,-50000&quot; viewpoint = &quot;0,1emu&quot; 
      viewpointorigin = &quot;0,0&quot; lightlevel2 = &quot;24000f&quot; lightlevel = &quot;44000f&quot; 
      brightness = &quot;10000f&quot; autorotationcenter = 
      &quot;t&quot;&gt;&lt;/O:EXTRUSION&gt;&lt;/V:RECT&gt;&lt;V:OVAL id=&quot;shadow&quot; coordsize = 
      &quot;21600,21600&quot; stroked = &quot;f&quot;&gt;&lt;V:FILL id=SP type = &quot;gradientRadial&quot; method = 
      &quot;linear sigma&quot; focussize = &quot;0,0&quot; focusposition = &quot;.5,.5&quot; color2 = 
      &quot;fill darken(0)&quot;&gt;&lt;/V:FILL&gt;&lt;/V:OVAL&gt;&lt;/TD&gt;&lt;/TR&gt;
  &lt;TR&gt;
    &lt;TD width=&quot;90%&quot;&gt;&lt;/TD&gt;
    &lt;TD align=middle&gt;&lt;NOBR&gt;
      &lt;DIV 
      style=&quot;MARGIN-TOP: -20px; MARGIN-LEFT: -31px; POSITION: absolute&quot;&gt;&lt;V:RECT 
      style=&quot;Z-INDEX: 1; WIDTH: 90px; POSITION: absolute; HEIGHT: 7px&quot; coordsize 
      = &quot;21600,21600&quot; fillcolor = &quot;red&quot;&gt;&lt;V:FILL type = &quot;gradient&quot; method = 
      &quot;linear sigma&quot; color2 = &quot;fill darken(118)&quot;  
      focus =&quot;50%&quot;&gt;&lt;/V:FILL&gt;&lt;/V:RECT&gt;&lt;V:RECT id=xb 
      style=&quot;Z-INDEX: 2; WIDTH: 2px; POSITION: absolute; HEIGHT: 7px&quot; coordsize 
      = &quot;21600,21600&quot;&gt;&lt;V:FILL type = &quot;gradient&quot; method = &quot;linear sigma&quot; 
      color2 = &quot;fill darken(118)&quot;   
      focus=&quot;-50%&quot;&gt;&lt;/V:FILL&gt;&lt;/V:RECT&gt;&lt;BR&gt;&lt;V:RECT 
      style=&quot;Z-INDEX: 1; WIDTH: 90px; POSITION: absolute; HEIGHT: 7px&quot; coordsize 
      = &quot;21600,21600&quot; fillcolor = &quot;red&quot;&gt;&lt;V:FILL type = &quot;gradient&quot; method = 
      &quot;linear sigma&quot; color2 = &quot;fill darken(118)&quot;  
      focus =&quot;50%&quot;&gt;&lt;/V:FILL&gt;&lt;/V:RECT&gt;&lt;V:RECT id=yb 
      style=&quot;Z-INDEX: 2; WIDTH: 2px; POSITION: absolute; HEIGHT: 7px&quot; coordsize 
      = &quot;21600,21600&quot;&gt;&lt;V:FILL type = &quot;gradient&quot; method = &quot;linear sigma&quot; 
      color2 = &quot;fill darken(118)&quot;   
      focus=&quot;-50%&quot;&gt;&lt;/V:FILL&gt;&lt;/V:RECT&gt;&lt;/DIV&gt;zoom&lt;BR&gt;
      &lt;INPUT onclick=&quot;setup(&#039;20&#039;)&quot; type=button value=1x&gt; 
&lt;INPUT onclick=&quot;setup(&#039;40&#039;)&quot; type=button value=2x&gt; 
&lt;INPUT onclick=&quot;setup(&#039;60&#039;)&quot; type=button value=3x&gt; 
&lt;INPUT onclick=&quot;setup(&#039;80&#039;)&quot; type=button value=4x&gt; &lt;BR&gt;colour&lt;BR&gt;
&lt;INPUT style=&quot;BACKGROUND-COLOR: #ffffff&quot; onclick=&quot;sc(&#039;wireframe&#039;)&quot; type=button&gt; 
&lt;INPUT style=&quot;BACKGROUND-COLOR: #eeeeee&quot; onclick=&quot;sc(&#039;#ffffff&#039;)&quot; type=button&gt; 
&lt;INPUT style=&quot;BACKGROUND-COLOR: #000000&quot; onclick=&quot;sc(&#039;#888888&#039;)&quot; type=button&gt; 
&lt;INPUT style=&quot;BACKGROUND-COLOR: #ff0000&quot; onclick=&quot;sc(&#039;#ff0000&#039;)&quot; type=button&gt; 
      &lt;BR&gt;&lt;BR&gt;&lt;/NOBR&gt;&lt;/TD&gt;
  &lt;TR&gt;
&lt;TD align=right colSpan=2&gt;&lt;B&gt;Developed in 2004 by )(ameleon&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;</code></pre></div><p>Автор примера - <strong>Xameleon</strong>.</p>]]></description>
			<author><![CDATA[null@example.com (The gray Cardinal)]]></author>
			<pubDate>Sat, 19 Jul 2008 08:54:51 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=12717#p12717</guid>
		</item>
	</channel>
</rss>
