Given a starting value and an ending value, QuickTime is able to figure out, for any moment in the duration of the animation, what the appropriate
value between those two values should be. This process is called tweening, and the track that contains the information needed to do the tweening
is called a tween track.
QuickTime provides support for either simple linear interpolations of data or more complex tweening operations and operations.
For instance, the various types of path tweens allow us to derive values based on the shape of an arbitrary curve defined by a vector path.
And the list tween derives values from a list of atoms in an atom container, which can result in a series of discrete steps of non–continuous values.
Anyway, QTPlugin currently supports only linear interpolations of numerical or graphical data.
The QTPlugin provides the developers with the Tween Framework to add tween–based animation to their applications.
The Tween Framework, which is a set of classes,
handles all the tasks necessary to provide tweening by using either tween tracks
or auto–running .
The QTPlgNewTweenTrack class is part of the Tween Framework and lets you add a tween track to a
.
→
The QTPlgNewTweenTrack class constructors are called when you create a new instance of the class, while
the ˜QTPlgNewTweenTrack 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. See the
validity conditions for more details.
The class provides you with the following initializer methods:
use this constructor to create a tween track and add it to the movie specified by the
m; if the
movie specified has been created in memory (see the
of the
class),
the tween samples added to the track reside in memory as well. You specify the characteristics of the tween samples to be
added to the track by setting the
of the
params object as appropriate. Finally, you can specify the desired time scale by setting the
optional parameter
timeScale; omitting to set this parameter will cause the default value of
600 to be used
use this function to add tween media samples (specified by the
data parameter) to the track. A tween sample is a constituted by a list
of one ore more . You specify the duration of the added sample by using the
duration parameter; this is a time value experessed in the media time scale. Note that you can add just one sample to the new track; anyway,
there is no limit to the number of tweens that can be inserted into the sample data (of course, this number should be adequate to the tweening operation you want
to perform with the current track). The type of the tween objects you are inserting in the track must be appropriate to the kind of data the tweening operation is going to
modify. For example, if you want to tween the volume of a sound track you should populate the list with
objects of type
once you have done with the media editing (that is after a call to
the class method), you need to create
a link between the tween track to the receiving track (specified by the
inputTrack parameter) and
to indicate how the receiving track should interpret the data it receives from the tween track. This method allows you to accomplish that. You specify the kind of data the
target track is going to receive from the modifier track by setting the
modifierType parameter with one the
defined by the class.
The value of this constant must specify a data type compatible with the type of the receiving track otherwise this method will fail; for example, makes no sense to
specify a for a video track. Finally,
depending on the value of the
modifierType parameter, the
id parameter means:
- if the receiving track is a , specifies the
target of the tweened data
(the property of the
class)
- in all the other cases, specifies the of the
that has to be used to perform data tweeninng
the tweened data modify the the target sprite is
associated with
the tweened data modify the of the
target sprite
the tweened data modify the of the
target sprite
the tweened data modify the of the
target sprite
the tweened data modify the
of a sound
the tweened data modify the of a video
the tweened data modify the of the
target