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

<BODY BGCOLOR=WHITE LINK="#0033CC" TOPMARGIN=15 LEFTMARGIN=20>
<FONT FACE="Verdana, Arial, Helvetica" SIZE=2> 
<CENTER>
<H1>DirectAnimation Hello World</H1>
</CENTER>

<OBJECT ID="DAControl"
  STYLE="position:absolute; left:0; top:0;width:800;height:300;z-index: -1"
  CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D">
</OBJECT>

<SCRIPT LANGUAGE="VBScript">
<!--
sub window_onLoad 

   Set m = DAControl.MeterLibrary

   'Create an animated color
   Set half = m.DANumber(0.5)
   Set clr = m.colorHslAnim( _
                m.Mul(m.LocalTime, m.DANumber(0.345)), _
                half, half)

   'Contstruct a 12pt font and a text image
   Set font = m.Font("Arial", 12, clr)  
   Set txtImg = m.StringImage("Hello, VBScript", font)

   'Move the text image across the page
   Set pos = m.Mul(m.Sin(m.LocalTime), m.DANumber(0.02))
   Set scl = m.Add(m.DANumber(2), m.Abs(m.Mul(m.Sin(m.LocalTime), m.DANumber(3))))
   Set xf = m.Compose2(m.Translate2Anim(m.DANumber(0), pos),  _
                       m.Scale2UniformAnim(scl))                       
   Set txtImg = txtImg.Transform(xf)

   'Assign the animation back to the control and start it
   DAControl.Image = txtImg
   DAControl.Start

end sub
-->
</SCRIPT>


<FONT SIZE=4 FACE="Verdana,Tahoma,Arial"> 
<P>
To use the DirectAnimation windowless control, simply place it in the page and
then, from scripting, build an animation and assign
it to the control. In this example, the words &quot;Hello VBScript&quot; are constructed using an 
animated 
color for the text. 
</FONT>
</FONT>
</BODY>
</HTML>

