Dynamic Extrusion Example (VML)


Purpose

This example demonstrates a dynamic VML extrusion. The scrollbar controls the size of the VML shape's extrusion.

Note: This example requires the use of ActiveX controls; if you have disabled ActiveX controls or are using a browser other than Internet Explorer, you may not see the scrollbar.

Example


VML Code


<!-- Include the VML behavior -->
<style>v\: * { behavior:url(#default#VML); display:inline-block }</style>

<!-- Declare the VML namespace -->
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v" />

<object classid="CLSID:DFD181E0-5E2F-11CE-A449-00AA004A803D"
        id="MyScroll" height="20" width="200">
  <param name="MousePointer" value="16">
  <param name="Orientation" value="2">
  <param name="Min" value="0">
  <param name="Max" value="100">
  <param name="Position" value="0">
</object>
<p>
<v:rect id="rect1" fillcolor="teal"
        style="top:350px; left:100px; width:80px; height:80px">
   <v:extrusion on="True" type="Perspective" backdepth="0" foredepth="0"
                lightposition.y = "-3000" lightposition.z = "-3000"
                color="fuschia"/>
</v:rect>
</p>

<script id="myscript" language="VBScript">
<!--
Sub MyScroll_Change()
  rect1.Extrusion.BackDepth = MyScroll.Value * 10
  rect1.Extrusion.Color = "fuchsia"
  MyScroll.Blur
End Sub
-->
</script>