## Introduction

Animation involves changing media over time or in reaction to user input. Media includes sound, 2-D images, and 3-D objects, along with their corresponding camera and lights, colors, textures, and other visual or audio properties. DirectAnimation™ allows developers to produce sophisticated animation from a relatively small number of classes and methods.

DirectAnimation supports a broad set of functionality for mixed-media animation, including:

- Importing images, translating and displaying them with pixel-to-pixel mapping to the screen.
- Creating 3-D scenes and rendering them with traditional lighting, shading, and camera models.
- Streaming audio and video from files or the network.
- Combinations of all of the above.

With DirectAnimation, you can create a rich interactive animation that draws on both synthetic media (such as 3-D graphics) and recorded media (such as audio and video). For example, you can navigate a 3-D space to inspect a collection of museum items or commercial products. You can implement spatial navigation by using position and orientation to index different items represented as images and video clips.

There are three basic ways to use DirectAnimation. HTML authors can integrate multimedia using the DirectAnimation controls. The controls can be further enhanced with JScript and/or VBScript. VBScript and JScript writers and Java applet writers can program animations for web pages. Finally, Java, Visual Basic, and C++ application programmers can develop ActiveX Controls or full applications. Thus, DirectAnimation provides a multimedia API and run time that scales from the HTML author to the C++ programmer.

The basic class in DirectAnimation is called a behavior. Use the DirectAnimation classes and methods to construct time-varying, interactive behaviors. You can join sequences of behaviors to produce complex, flexible animation from just a few operations.

Behaviors that are rendered for presentation to the user are called media behaviors. These include:

- 2-D image behaviors (the DAImage class and Java ImageBvr class)
- 3-D geometry behaviors (the DAGeometry class and Java GeometryBvr class)
- sound behaviors (the DASound class and Java SoundBvr class)

Other behaviors control the attributes of the media behaviors, or the way they are rendered to the screen. For example:

- Color behavior (the DAColor and ColorBvr classes)
- Camera behavior (the DACamera and CameraBvr classes)
- Transform behavior (the DATransform2 and DATransform3 classes, and the Java Transform2Bvr and Transform3Bvr classes)

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.