Animation Services

Microsoft Agent's animation services manage the animation and movement of a character's image in its own window on the screen. An animation is defined as a sequence of timed and optionally branched frames, composed of one or more images. Specifying the Play statement with the name of an animation plays that animation. Animation names are specific to a character definition. As an animation plays, the shape of its window changes to the match the image in the frame. This results in a movable graphic image, or sprite, displayed on top of the desktop and all windows.

Each client application can display and animate its own character. You can also share a character between multiple client applications. Microsoft Agent also supports clients using multiple characters displayed at the same time. The animation services enable you to animate characters independently or synchronize their animation.

To access a character, use the Load method to load the character's data. Microsoft Agent's services include a data provider that supports two formats for loading character and animation data: a single structured file and separate files. Typically, you would use the single file format (.ACS) when the data can be stored locally. The multiple file format (.ACF,.AAF) works best when you want to download animations individually, such as when accessing animations from a Web page script.

Microsoft Agent provides a set of characters you can download and use, subject to the provisions of the license agreement. For information on accessing the characters, see the Microsoft Agent Characters page.

You can define your own character and its animations using any rendering tool you prefer. To compile a character's animations for use with Microsoft Agent, use the Microsoft Agent Character Editor. This tool enables you to define a character's default properties as well as define animations for the character. The Microsoft Agent Character Editor also enables you to select the appropriate file format when you create a character. For alternative formats or rendering, you can supply your own animation data provider.

The animation services also play certain animations automatically. For example, when you call the MoveTo and GestureAt methods, the server determines what animation to play based on the character's current position. Similarly, the services play Idling animations when the user has not interacted with the character. These server-managed animations are called "states," and are defined when a character is created. For more information, see Using The Microsoft Agent Character Editor.

Client applications can directly hide or show a character by using the Hide or Show methods that play the animations assigned to the Hiding and Showing states and set the character's Visible property. This functionality enables you to display or hide a character using your own interface.

Although the server produces no output when a character is hidden, the server still queues and processes the animation request (plays the animation), but passes a request status back to the client. In the hidden state, the character cannot become input-active. However, if the user speaks the name of a hidden character (when speech input is enabled), the server automatically shows the character.

Microsoft Agent queues animation requests and processes them asynchronously. This enables your application's code to continue while character animations play. However, you can still monitor and manage your character's animation queue by creating an object reference to the request.