QuickTime Pro: Capabilities of Sprite Tracks

This document discusses some of the capabilities of sprite tracks in a QuickTime movie using QuickTime Pro.

This article has been archived and is no longer updated by Apple.

Sprites are animations in which an image, a short image sequence, or a video clip is moved around in the frame along a vector path by the computer. Think of Pac-Man or the little critters in any older videogame and you've got the basic idea of a sprite (although sprites can be a lot more sophisticated than that). All you do as the sprite creator is create the image (such as a logo), specify the movement path (a spin motion, for example), and add other behaviors (play a logo sound) attached to it. The computer does the rest. The first frame of the animation contains the image data; the subsequent frames contain only a reference to the image and the behavior and new x and y coordinates where the image will be displayed. All the calculations are done on the viewer's computer, making sprites a very efficient, low-bandwidth way to create movement.

A sprite track in QuickTime contains sprite animation that you create in an authoring program such as LiveStage or LiveStage Pro, Adobe's GoLive, or Electrifier Pro, and then import into QuickTime. Sprites have several important properties:

  • Sprites can change position, scale, and rotation according to values inserted into a transformation matrix.
  • Sprites are automatically cropped as they cross the edges of the frame.
  • Multiple sprites can exist in a sprite track, and they can pass in front of or behind each other (and change their depth order in the course of the movie)
  • The source for a sprite can be a single bitmap, a bitmap image sequence, a vector image, a video track, a live stream, or even a source specified by an URL.
  • All these properties, and others, can be combined, and modified as the movie plays, enabling the creation of very complex images and behaviors at virtually no cost in bandwidth.

Modifier and Tween Tracks
Importing a sprite to make a sprite track is just the beginning, however. QuickTime contains an invisible media type called a modifier track. The modifier track contains data that are used only to modify other tracks. Any media type, such as a video track, can be modified with an appropriate modifier track.

One use for a modifier track is to contain a series of coordinate numbers that change the position of a sprite. The most common way to do this is to use a type of modifier track called a tween track. The tween track generates a series of values from a specified starting point to a specified ending point over a given duration. For example, using a tween track, you can specify the movement of a sprite using just three sets of numbers: start position, end position, and duration. The tween track interpolates between the coordinates of the beginning and ending positions and automatically feeds the sprite a smoothly incrementing series of positions for the duration of the movement. The tween track always generates as many in-between values as possible, and the animation plays at the maximum frame rate the host computer can support, so the faster the host computer, the smoother the animation.

A tween track can generate many types of sprite data, such as:

  • Position in the transformation matrix
  • Layer depth
  • Image source
  • Index

Three tween tracks can send a sprite tumbling across the frame, in front of or behind other tweens, and load a repeating sequence of images for the sprite as it goes.

You can also apply tween tracks to other movie or track properties. For example, using LiveStage Pro you can fade video in and out by setting the blend value of a video track.

Actions and Events
The actions of a sprite can be driven by system events such as mouse actions or keystrokes. So you can use sprites to design custom movie controllers that your audience can click on. Another thing sprites can do is check their own position coordinates, layer number, and index, and change their behavior according to criteria you define. For example, a sprite can look to see if it reaches the edge of the frame and execute a "bounce" movement when it does. A sprite can also modify its behavior with the passage of time, either "movie" time (the duration in which the movie plays) or in real time. In fact, a sprite can continue to act even after the movie it is in is paused or stopped

Information about products not manufactured by Apple is provided for information purposes only, and does not constitute Apple's recommendation or endorsement. Please contact the vendor for additional information.

The following document can help you search for a particular vendor's address and phone number:

Document 17159: "Locating Vendor Information"


Published Date: Feb 20, 2012