The Design and Implementation of Multimedia Software
An Example with Tweened Described Content

The Code for the Sprite

/**
 * A Buzzy moving on mars
 *
 * @author  Prof. David Bernstein, James Madison University
 * @see     "The Design and Implementation of Multimedia Software (c) 2011"
 * @version 1.0
 * @augments DescribedSprite
 */
BuzzyOnMars.prototype = new DescribedSprite();
BuzzyOnMars.prototype.constructor = BuzzyOnMars;

/**
 * Default Constructor
 */
function BuzzyOnMars()
{
   this.initializeDescribedSprite();

   var buzzy = new BoringBuzzy();
   this.addKeyTime(  500, new Point2D(  0.0, 380.0),  0.00, 1.0, buzzy);
   this.addKeyTime( 2000, new Point2D(180.0, 380.0),  0.00, 1.0, null);        
   this.addKeyTime( 4000, new Point2D(180.0,  75.0),  0.20, 1.0, null);        
   this.addKeyTime( 6000, new Point2D(640.0,  20.0),  6.48, 1.0, null);        
   this.setEndState(this.REMOVE);
}