Contents
Navigation
Home User Reference Other Resources


Sprites were introducted in QuickTime 2.5 and have since been enhanced in later versions of QuickTime.

The metaphor of a sprite animation as a theatrical play is used, in which sprite tracks are characterized as the boundaries of the stage and a sprite world or a as the stage itself. To extend the metaphor, you may want to think of sprites as actors performing on that stage.

Each sprite has that describe its location and appearance at a given time. During an animation sequence, modifying the sprite’s properties causes it to change its appearance and move around the screen. Sprites may be mixed with still–image graphics to produce a wide variety of effects while using relatively little memory.

The QTPlugin provides the developers with the Sprite Framework to add sprite–based animation to their applications. The Sprite Framework, which is a set of classes, handles all the tasks necessary to compose and modify sprites, their backgrounds and properties, in addition to transferring the results to the screen or to an alternate destination.

Each sprite has a corresponding image. During the animation, you can change a sprite’s image. For example, you can assign a series of images to a sprite in succession to perform cell–based animation.

The QTPlgSprite class is part of the Sprite Framework and, along with the class defines the basic objects you need to use to implement sprite–based animation.







The QTPlgSprite class constructors are called when you create a new instance of the class, while the ˜QTPlgSprite class destructor, is called automatically when the class is no more in use. Also, you can invoke the class destructor by setting the instance of the class to nil.

Once a new class instance is returned, it is good practice to check the class property to be sure that the new object can be used. A QTPlgSprite class instance is valid if it has an and valid .


The class provides you with the following initializer methods:
()
This is the default class initializer. The properties of the object are set with the following values:
  • =""
  • =0
  • =0
  • =black
  • =
  • =
  • =nil
(other as QTPlgSprite)
This is the copy constructor. The properties of the object to be copied will be used to initialize the new class instance properties

a descriptive name for the current image
specifies the sprite’s current image in the pool of available images
specifies a group id (if any) the image belongs to. This is useful if you want to assign to a images that have different image descriptions (i.e., images with different dimensions). Since version 3 of QuickTime, sprites can display images with the different image descriptions but you must assign group IDs to sets of equivalent images in your key frame sample. For example, if the sample contains 10 images where the first 2 images are equivalent, and the last 8 images are equivalent, you could assign a group ID of 100 to the first 2 images, and a group ID of 101 to the last 8 images. This divides the images in the sample into two sets. The actual ID does not matter; it just needs to be a unique positive integer. Each image in a sprite media key frame sample is assigned to a group
determines the initial properties of the sprite
specifies an offset that is applied to a sprite’s source matrix. A sprite’s default registration point is (0,0), or the top left of its source box (i.e. the track’s box that contains it)
specifies the image associated to the current sprite

()
use this method to roll all of the class properties back to their initial state (see the for more details)
returns nothing