<HTML>
<HEAD>
<TITLE>DirectAnimation SDK, Java sample</TITLE>
<SCRIPT LANGUAGE="JScript">
<!--
if (window.top.frames.length!=0 && window.top.frames[0].ShowNoButtons!=null)
    window.top.frames[0].ShowNoButtons();
//-->
</SCRIPT>
</HEAD>

<BODY BGCOLOR=WHITE LINK="#0033CC" TOPMARGIN=15 LEFTMARGIN=20>
<FONT FACE="Verdana, Arial, Helvetica" SIZE=2>
<!--<Tutorial Section=2.0 Title="Obtaining the Color from the Scrollbars">-->
<!--/** 
Here, in the Using_VBScript.html file, three subroutines are created which<BR>
retrieve the scrollbar values and set the VBScript class R,G,B data members.<BR>
They then call updateColor in the VBScriptModel class, which then updates<BR> 
the color of the sphere applet of a change in color.
**/-->
<SCRIPT LANGUAGE="VBScript">
<!--
Sub RedScroll_Change()
   RedDec.Text=RedScroll.Value
   RedHex.Text=Hex(RedScroll.Value)
   document.DxmControl.R=RedScroll.Value/256
   UpdateVals
End Sub

Sub GreenScroll_Change()
   GreenDec.Text=GreenScroll.Value
   GreenHex.Text=Hex(GreenScroll.Value)
   document.DxmControl.G=GreenScroll.Value/256
   UpdateVals
End Sub

Sub BlueScroll_Change()
   BlueDec.Text=BlueScroll.Value
   BlueHex.Text=Hex(BlueScroll.Value)
   document.DxmControl.B=BlueScroll.Value/256
   UpdateVals
End Sub

Sub UpdateVals
   ColorTextBox.Backcolor = RGB(RedScroll.Value, GreenScroll.Value, BlueScroll.Value)
   document.DxmControl.updateColor()
End Sub
-->
</SCRIPT>
<!--</Tutorial>-->

<CENTER><P><FONT SIZE=4>DirectAnimation and VBScripting</FONT></P>
This example uses Forms 2.0 Controls and VBScript to send events<BR>
to the DirectAnimation applet and change the material color. Picking 
on the sphere also changes the color and exports an event that is
reflected by the VB Controls.
<P> For a short tutorial on this sample click this button: 
<A HREF="Using_VBScript\Section1.html" TARGET="_blank"><IMG HEIGHT="44" WIDTH="44" ALT="Tutorial" ALIGN=MIDDLE SRC="..\..\..\..\Media\image\info.gif"></A>
<P>
<A HREF="Using_VBScript\VBScript.java">View Java Source Code</A>
</P>
<P></CENTER>

<TABLE WIDTH=100% BORDER=0 CELLSPACING=5><TR><TD> 
<TABLE BORDER=0 CELLSPACING=0>
<TR><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>Dec</TD><TD>Hex</TD><TD>&nbsp;</TD></TR>
<TR><TD colspan=2 align=right height=28>
Red &nbsp; &nbsp;&nbsp;
<OBJECT ID="RedScroll" WIDTH=171 HEIGHT=21 ALIGN=CENTER
 CODEBASE="http://activex.microsoft.com/controls/mspert10.cab" 
 CLASSID="CLSID:DFD181E0-5E2F-11CE-A449-00AA004A803D">
    <PARAM NAME="Size" VALUE="4516;564">
    <PARAM NAME="Max" VALUE="255">
    <PARAM NAME="LargeChange" VALUE="51">
    <PARAM NAME="Orientation" VALUE="1">
</OBJECT>
</TD>
<TD>
<OBJECT ID="RedDec" WIDTH=41 HEIGHT=21
  CODEBASE="http://activex.microsoft.com/controls/mspert10.cab"
  CLASSID="CLSID:8BD21D10-EC42-11CE-9E0D-00AA006002F3">
    <PARAM NAME="VariousPropertyBits" VALUE="679495707">
    <PARAM NAME="Size" VALUE="1094;564">
    <PARAM NAME="Value" VALUE="0">
    <PARAM NAME="FontCharSet" VALUE="0">
    <PARAM NAME="FontPitchAndFamily" VALUE="2">
    <PARAM NAME="FontWeight" VALUE="0">
</OBJECT>
</TD>
<TD>
<OBJECT ID="RedHex" WIDTH=41 HEIGHT=21
  CODEBASE="http://activex.microsoft.com/controls/mspert10.cab" 
  CLASSID="CLSID:8BD21D10-EC42-11CE-9E0D-00AA006002F3">
    <PARAM NAME="VariousPropertyBits" VALUE="679495707">
    <PARAM NAME="Size" VALUE="1094;564">
    <PARAM NAME="Value" VALUE="0">
    <PARAM NAME="FontCharSet" VALUE="0">
    <PARAM NAME="FontPitchAndFamily" VALUE="2">
    <PARAM NAME="FontWeight" VALUE="0">
</OBJECT>
</TD>
<TD ROWSPAN=3>
<OBJECT ID="ColorTextBox" WIDTH=95 HEIGHT=79
  CODEBASE="http://activex.microsoft.com/controls/mspert10.cab"
  CLASSID="CLSID:8BD21D10-EC42-11CE-9E0D-00AA006002F3">
    <PARAM NAME="VariousPropertyBits" VALUE="746604571">
    <PARAM NAME="Size" VALUE="2505;2081">
    <PARAM NAME="FontCharSet" VALUE="0">
    <PARAM NAME="FontPitchAndFamily" VALUE="2">
    <PARAM NAME="FontWeight" VALUE="0">
</OBJECT>
</TD>
<TR><TD colspan=2 align=right height=28>
Green  &nbsp; &nbsp;&nbsp;
<OBJECT ID="GreenScroll" WIDTH=171 HEIGHT=21 ALIGN=CENTER
  CODEBASE="http://activex.microsoft.com/controls/mspert10.cab"
CLASSID="CLSID:DFD181E0-5E2F-11CE-A449-00AA004A803D">
    <PARAM NAME="Size" VALUE="4516;564">
    <PARAM NAME="Max" VALUE="255">
    <PARAM NAME="LargeChange" VALUE="51">
    <PARAM NAME="Orientation" VALUE="1">
</OBJECT>
</TD>
<TD>
<OBJECT ID="GreenDec" WIDTH=41 HEIGHT=21
  CODEBASE="http://activex.microsoft.com/controls/mspert10.cab"
CLASSID="CLSID:8BD21D10-EC42-11CE-9E0D-00AA006002F3">
    <PARAM NAME="VariousPropertyBits" VALUE="679495707">
    <PARAM NAME="Size" VALUE="1094;564">
    <PARAM NAME="Value" VALUE="0">
    <PARAM NAME="FontCharSet" VALUE="0">
    <PARAM NAME="FontPitchAndFamily" VALUE="2">
    <PARAM NAME="FontWeight" VALUE="0">
</OBJECT>
</TD>
<TD>
<OBJECT ID="GreenHex" WIDTH=41 HEIGHT=21
  CODEBASE="http://activex.microsoft.com/controls/mspert10.cab"
CLASSID="CLSID:8BD21D10-EC42-11CE-9E0D-00AA006002F3">
    <PARAM NAME="VariousPropertyBits" VALUE="679495707">
    <PARAM NAME="Size" VALUE="1094;564">
    <PARAM NAME="Value" VALUE="0">
    <PARAM NAME="FontCharSet" VALUE="0">
    <PARAM NAME="FontPitchAndFamily" VALUE="2">
    <PARAM NAME="FontWeight" VALUE="0">
</OBJECT>
</TD></TR>
<TR><TD colspan=2 align=right height=28>
Blue  &nbsp; &nbsp;&nbsp;
<OBJECT ID="BlueScroll" WIDTH=171 HEIGHT=21 ALIGN=CENTER
  CODEBASE="http://activex.microsoft.com/controls/mspert10.cab"
CLASSID="CLSID:DFD181E0-5E2F-11CE-A449-00AA004A803D">
    <PARAM NAME="Size" VALUE="4516;564">
    <PARAM NAME="Max" VALUE="255">
    <PARAM NAME="LargeChange" VALUE="51">
    <PARAM NAME="Orientation" VALUE="1">
</OBJECT>
</TD>
<TD>
<OBJECT ID="BlueDec" WIDTH=41 HEIGHT=21
  CODEBASE="http://activex.microsoft.com/controls/mspert10.cab"
  CLASSID="CLSID:8BD21D10-EC42-11CE-9E0D-00AA006002F3">
    <PARAM NAME="VariousPropertyBits" VALUE="679495707">
    <PARAM NAME="Size" VALUE="1094;564">
    <PARAM NAME="Value" VALUE="0">
    <PARAM NAME="FontCharSet" VALUE="0">
    <PARAM NAME="FontPitchAndFamily" VALUE="2">
    <PARAM NAME="FontWeight" VALUE="0">
</OBJECT>
</TD>
<TD>
<OBJECT ID="BlueHex" WIDTH=41 HEIGHT=21
  CODEBASE="http://activex.microsoft.com/controls/mspert10.cab"
  CLASSID="CLSID:8BD21D10-EC42-11CE-9E0D-00AA006002F3">
    <PARAM NAME="VariousPropertyBits" VALUE="679495707">
    <PARAM NAME="Size" VALUE="1094;564">
    <PARAM NAME="Value" VALUE="0">
    <PARAM NAME="FontCharSet" VALUE="0">
    <PARAM NAME="FontPitchAndFamily" VALUE="2">
    <PARAM NAME="FontWeight" VALUE="0">
</OBJECT>
</TD></TR>
</TABLE>
</TD><TD ALIGN=CENTER>

<!-- Applet tag -->
<APPLET CODEBASE="..\..\..\..\Media\" CODE="VBScript.class" ID="DxmControl" WIDTH=200 HEIGHT=200></APPLET>

</TD></TR>
</TABLE>
</FONT>
</BODY>
</HTML>










































































