<HTML>
<HEAD>
<TITLE>DirectAnimation SDK, JScript 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> 
<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="JScript">
<!--
  // The DirectAnimation library.
  m = DAControl.PixelLibrary;

  // Create an animated color.
  half = m.DANumber(0.5);
  clr = m.colorHslAnim(m.Mul(m.LocalTime,
    m.DANumber(0.345)),half, half);

  // Contstruct a 12pt font and a text image.
  font = m.Font("Arial", 12, clr);
  txtImg = m.StringImage("Hello, JScript", font);

  // Move the text image across the page by changing
  // its position and scale vary over time.
  pos = m.Mul(m.Sin(m.LocalTime), m.DANumber(0.02));
   
  scl = m.Add(m.DANumber(2), m.Abs(m.Mul(m.Sin(m.LocalTime), m.DANumber(3))));
 
  xf = m.Compose2(m.Translate2Anim(m.DANumber(0), pos),
    m.Scale2UniformAnim(scl));

  // Apply transformation to the text image.            
  txtImg = txtImg.Transform(xf);
   
  // Set the image into the control
  DAControl.Image = txtImg; 
  
  // Set the background in case of a non-windowless browser (like IE3).
  DAControl.BackgroundImage = m.SolidColorImage(m.Blue);     
     
  // Start the animation.       
  DAControl.Start()
-->
</SCRIPT>

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

