Technical: QuickTime
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

title


Previous Section Table of Contents Next Section


Sprites

Contents

Movie Sprites

Reference

A sprite is a graphical object that is specified once, then animated by making calls to special QuickTime routines. Most other animation techniques are based on bitmaps or vectors that must be constantly redefined. Sprites consume much less memory because they are defined only once.

A QuickTime sprite is a freestanding animated graphic. If the user's screen is like a stage, sprites are like actors that can show up anywhere, move around, and change form.

The advantage of sprites is that they are easy to control and don't use much memory. You define each sprite once and then animate it with simple commands, instead of defining dozens of byte-gobbling bitmaps, one for each location.

In QuickTime, sprites are defined by means of QT atoms. A sprite can be created from almost any data source: a bitmap, an MPEG video file, etc. Once a sprite is created from whatever source and placed in a sprite track, it is controlled from then on by QuickTime calls.

Each sprite has properties that describe its location and appearance at a given time. During the course of an animation, your code makes calls to QuickTime that modify a sprite's properties.

Movie Sprites

A group of sprites can live in either a movie track or a sprite world. In a movie, a sprite can appear alone or over a video track and can act as a graphic or as an interactive button.

Sprites within movies live in a sprite track and are animated by the QuickTime sprite media handler.

As with sprites created in a sprite world, sprites in a movie's sprite track have properties that define their locations, images, and appearance. However, your code mostly uses a different process and different QuickTime calls to create and animate a sprite track.

A sprite track is defined by one or more key frame samples, each followed by any number of override samples. Each key frame sample contains all of the images used by the sprites, and different sprites may share image data.

A good example of movie sprites are the penguins shown in the diagram below where the arrows are wired sprites that act as buttons.

References

Introduction to Wired Movies, Sprites, and the Sprite Toolbox

 



Previous Section Table of Contents Next Section