<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 TOPMARGIN=15 LEFTMARGIN=20 ONRESIZE="setSize()">

<FONT FACE="Verdana, Arial, Helvetica" SIZE=2> 
<CENTER><BR>
<H1>Dynamic resize of the control using DHTML</H1>
<BR>
<BR>
This example shows how the control's sizing can be tied to 
the current size of the browser window.
</CENTER>
          
<OBJECT ID="DAControl"
  STYLE="position:absolute; left:50; top:25; z-index:-1" 
  CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
<!--
	m = DAControl.MeterLibrary;  
  mediaBase = "../../../../media/";  
	
  // When the OnResize event in the BODY tag is triggered, this method is called
  setSize();
	function setSize() {
    DAControl.style.width = document.body.clientWidth-105;;
    DAControl.style.height = document.body.clientHeight-100;
	}

  // This is just an animated cloud image to fill the window with something
  time = m.Integral(m.DANumber(.002));
  fillImg = m.ImportImage(mediaBase + "image/cldtile.jpg").Tile();
  fillImg = fillImg.Transform(m.Translate2Anim(time,time));

  // Set the image property to our content and start the control
	DAControl.Image = fillImg;
	DAControl.Start();
//-->
</SCRIPT>
</FONT>
</BODY>
</HTML>
