    Contents   Index  Topic Contents
    Previous Topic: Getting Started
    Next Topic: How to Create a JScript Animation

> ## Guide to Samples

> This article contains descriptions of all the templates, exercises, and showcase samples, plus step-by-step procedures describing how to perform basic Microsoft® DirectAnimation™ tasks.

> To go directly to the main sample page for each of the five languages and the DirectAnimation controls, select one of the following:

> - VBScript Samples Main Page
> - Control Samples Main Page
> - Visual Basic Samples Main Page

> On the sample main pages you will see a list of all the samples available of that type. To return to the DirectAnimation documentation, choose the Docs button below the left-hand table of contents.

> You can also access individual DirectAnimation samples from this Guide to Samples topic by clicking the name of the sample. This will display the sample, but will not take you out of the DirectAnimation documentation and will not display a table of contents listing all the language samples.

> See the following sections for descriptions of the samples and step-by-step instructions for building animations. The sample paths refer to the default sample directories create when you install the DirectX Media SDK. You can also access the samples on this Web site by clicking on the links.

> When you open a sample it creates a new browser window. Only one sample window will be open at one time. If you minimize the sample window or place the sample window in the background, you have to click the sample window to bring it on top again. You would need to do this, for example, to see the sample window when you open another sample.

> - Samples Overview
> - VBScript Samples
> - Control Samples
> - How to Create a JScript Animation
> - How to Create a VBScript Animation
> - How to Build a DirectAnimation Java Applet or Application
> - How to Write a DirectAnimation Java Applet
> - How to Build the DirectAnimation C++ Samples that Render to DirectDraw Surfaces
> - How to Build the DirectAnimation C++ Samples that Use the Windowed Control

> ### Samples Overview

> DirectAnimation comes with a wide variety of samples that show you how to use DirectAnimation from different languages. You can cut and paste portions or all of these samples for your own animations. The samples come with a pool of media files, including MIDI, 3-D model, image, video, and sound files. These media files are used by the SDK samples, and are available for use in the DirectAnimation content only. You are not allowed to use these media files in any other fashion.

> For each language, there are three categories of samples:

> - Exercises: Illustrate basic use of DirectAnimation at an introductory level.
> - Templates: Provide code that implements common DirectAnimation tasks, such as how to asynchronously download media, use the pixel construction mode, animate HTML and other controls, and sequence animation behaviors along a timeline.
> - Showcase samples: Demonstrate the breadth of features in the system. Some of these samples have real-life applications, such as advertising or education.

> The DirectAnimation SDK also contains a set of samples illustrating the DirectAnimation controls.

> In addition, the DirectAnimation SDK provides tutorials. Some of the Java showcase samples and most of the Java templates have tutorials that show step-by-step details of their construction. Samples that have associated tutorials include a button labeled Info on the sample's main HTML page. This button launches a new instance of the browser, so that you can see the narration side-by-side with the running animation.

> All the examples discussed are in one of the subdirectories in Samples\DA.

> ### VBScript Samples

> This section describes the VBScript Samples included with DirectAnimation. Click any link to display the sample.

> This section describes the following types of samples:

> - VBScript Templates
> - VBScript Showcase Samples

> #### VBScript Templates

> The VBScript template samples are in the Samples\DA\VBScript\Templates folder. The following table lists the available VBScript templates and the concepts that they illustrate (click any link to display the sample):

> VBScript template name | Description
> HelloWorldVBS.html | The HelloWorld VBScript sample demonstrates basic text animation as a windowless control.
> Basic.html | The Basic VBScript sample demonstrates a simple animation (rotating oval) using the core DirectAnimation library. This is useful as a starting point for writing new content.
> BasicDS.html | The BasicDS VBScript sample is the same animation as Basic but written using the drawing surface API, which has a slightly different style.
> Movie.html | The Movie VBScript sample demonstrates how to play a movie.
> AudioMixing.html | The AudioMixing VBScript sample demonstrates how to mix audio. The volume and panning of three sounds are controlled by the positions of the scroll bars.
> ButtonSwitch | The ButtonSwitch VBScript sample demonstrates how to use modifiable behaviors and buttons.
> ScrollSwitch | The ScrollSwitch VBScript sample demonstrates how to use modifiable behaviors and scroll bars.
> SplineLogo.html | The SplineLogo VBScript sample demonstrates a spline that is used both as a boundary of a shape and as an animation path.
> Callback.html | The Callback VBScript sample demonstrates how to use a scripting callback with two buttons and a piece of HTML text. Pressing the buttons animates the buttons in 3-D, emits a sound, and moves the HTML text in direction the button indicates.
> AnimatedProperties.html | The AnimatedProperties VBScript sample demonstrates animated strings, numbers, and script callbacks.

> #### VBScript Showcase Samples

> The VBScript showcase samples are in the Samples\DA\VBScript\Showcase. The following table lists the available VBScript showcase samples and the concepts that they illustrate (click any link to display the sample):

> VBScript showcase name | Description
> Runners.html | The Runners VBScript sample demonstrates instantiating and sequencing two structured graphics models.
> Coffee.html | The Coffee VBScript sample demonstrates how to use montages (2.5-D images).
> Pick3.html | The Pick3 VBScript sample demonstrates animated and interactive 3-D .x models rendered as windowless controls over the HTML page.
> Clock.html | The Clock VBScript sample demonstrates time-accurate animation of a clock with a radially filled background.
> Curves.html | The Curves VBScript sample demonstrates time-varying cubic B-spline curves that are used to clip an image whose opacity is also time-varying. The end result is a windowless control on top of HTML text.
> MsCubes.html | The MsCubes VBScript sample constructs 3-D animate cubes with motion GIF texturing. A mouse click stops and starts one aspect of the animation.
> DancingTrapzoids.html | The DancingTrapzoids VBScript sample shows rectangles with time-varying colors that chase each other along a trajectory.

> ### Control Samples

> All of the control samples are contained in the Samples\DA\Controls folder. The following table shows the available controls samples (click any link to display the sample):

> Control sample | Description
> AniFilt.htm | The AniFilt DirectAnimation control sample demonstrates how to use dynamic filtering for a cut-out effect on text.
> Buttons.htm | The Buttons DirectAnimation control sample demonstrates three-state buttons using sprites.
> Clock.htm | The Clock DirectAnimation control sample demonstrates time-accurate animation of a clock with a radially filled background.
> Complex.htm | The Complex DirectAnimation control sample demonstrates structured graphics.
> Count.htm | The Count DirectAnimation control sample demonstrates using structured graphics and sequencing to control multimedia event timing.
> Filter.htm | The Filter DirectAnimation control sample demonstrates using filters, including filter information.
> Globe.htm | The Globe DirectAnimation control sample demonstrates mouse interaction with sprites.
> Mega.htm | The Mega DirectAnimation control sample demonstrates a splash page using structured graphics.
> Path.htm | The Path DirectAnimation control sample demonstrates path controls that move objects around a page.
> SG-DrawingSurface.htm | The SG-DrawingSurface DirectAnimation control sample demonstrates using the DirectAnimation library for Drawing Surface operations.
> SG-Preserve.htm | The SG-Preserve DirectAnimation control sample demonstrates how to preserve an image's aspect ratio as the window is resized.
> SpinIE.htm | The SpinIE DirectAnimation control sample demonstrates spinning the letter E in 3-D.
> Textmask.htm | The TextMask DirectAnimation control sample demonstrates how to use text for clipping animate structured graphics on an image background.
> Yoyo.htm | The Yoyo DirectAnimation control sample demonstrates mouse interaction with a sprite.

> © 1998 Microsoft Corporation. All rights reserved. Terms of use.

> Top of Page