<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 BACKGROUND="../../../../media/image/epad512.gif">

<CENTER>
<FONT FACE=VERDANA SIZE=3>
<FONT SIZE=5>
Windowless Control Template
</FONT>
<BR><BR>

The following example shows how DirectAnimation can be used to create a windowless
control. The template shows a reactive animation that is seamlessly overlaid 
with regular HTML elements such as this text.  Using dynamic HTML, you can switch the 
Z ordering of the animation in relation to other elements, such as the text.  If the 
Z value is less than zero, the animation will be below the text and if greater than zero
it will be above the text. 

<!-- <Tutorial Section=1.2> -->
<!--
// In the HTML file we place the DirectAnimation windowless control. This is what
// will actually display our model.  Notice you can set it's style properties to
// get the proper layout and sizing.  See IE4 documentation on style sheets for
// more information about using them.  
-->
<OBJECT STYLE="POSITION:ABSOLUTE; TOP:45; LEFT:35%; WIDTH:375; HEIGHT:375; Z-INDEX:1"
 ID="dxactrl" CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D"></OBJECT>

<!--
// Also insert the applet which constructs your model.  Notice that it's width and
// height are zero since it is only used to construct the animation
-->
<APPLET CODEBASE="..\..\..\..\Media\" CODE=WindowlessApplet.class WIDTH=0 HEIGHT=0 ID=javaApp></APPLET>


<!--
// A script is used to bridge the gap and pass the needed view, image and sound to 
// the dxactrl for display.
-->
<SCRIPT LANGUAGE="VBScript">
<!--  
  AnimationOnTop = false

  sub window_onLoad
      dxactrl.View = javaApp.grabViewComPtr
      dxactrl.Image = javaApp.grabImageComPtr
      dxactrl.Sound = javaApp.grabSoundComPtr

      ' Start the control viewing
      dxactrl.Start 
  end sub
  
  Sub ChangeZ_OnClick
	If AnimationOnTop Then 	
	  AnimationOnTop = false
	  dxactrl.style.zindex = 1
	Else
	  AnimationOnTop = true
	  dxactrl.style.zindex = -1			
	End If
  End Sub
-->
</SCRIPT>
<!-- </Tutorial> -->

<DIV STYLE="POSITION:ABSOLUTE; LEFT:0;TOP:400;">
Right click to make the cube shrink so the you can read the text.<BR>
Left click to interact with the cube.<BR>
Click on the button to dynamically switch the Z ordering of the Text and Animation.
<BR>
<INPUT TYPE=BUTTON VALUE="Change Z-Order" NAME="ChangeZ">
<BR>
For a short tutorial on this sample click this button:
<A HREF="IE4_Windowless\Section1.html" TARGET="_blank"><IMG HEIGHT="44" WIDTH="44" ALT="Tutorial" ALIGN=MIDDLE SRC="..\..\..\..\Media\image\info.gif"></A>
<BR><A HREF="IE4_Windowless\WindowlessApplet.java">View Java Source Code</A>
</DIV>
</FONT>
</CENTER>
</BODY>
</HTML>