<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 TOPMARGIN=15 LEFTMARGIN=20>
<FONT FACE="Verm.na, Arial, Helvetica" SIZE=2> 
<CENTER>
<H1>Drawing a Rotating Oval</H1>
</CENTER>

<OBJECT ID="DAControl"
   STYLE="position:absolute; left:30%; top:100;width:300;height:300" 
   CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D">
</OBJECT>
<!--USE COMMENT TAGS FOR SCRIPTING-->
<SCRIPT LANGUAGE="VBScript">
<!--
sub window_onLoad
  Set m = DAControl.PixelLibrary

  '* -- Insert your code here --*
  '* define a red oval
  Set fillImg = m.SolidColorImage(m.Green)
  Set ovalImg = m.Oval(200,200).Fill(m.DefaultLineStyle, fillImg)

  '* rotation by 45 degrees per sec around 3D first diagonal 
  Set rotXf  = m.Rotate3RateDegrees(m.Vector3(1,1,1), 45).ParallelTransform2()

  '* apply rotation to oval
  Set finalImg = ovalImg.Transform(rotXf)
  '* -- End code -- *

  '* set the rotating oval, an image, as the model to be displayed  
  DAControl.Image = finalImg
  '* set the background in case of a non-windowless browser (such as IE3)
  DAControl.BackgroundImage = m.SolidColorImage(m.Blue)

  '* start the animation
  DAControl.Start
end sub

-->
</SCRIPT>
</FONT>
</BODY>
</HTML>
