// 
//
// Define an opening animation used for latency masking during
// media files download.
//
// 
//
import com.ms.dxmedia.*;
// 
class loadAnimation extends Statics {
  public ImageBvr getImage(NumberBvr progress) {
    // There are two primary images, introImg and radarImg, in this animation.
    // The introImg composes of a few text images and a progress indicator.
    String[] intro = {"Direct", "X", "Media", "for Animation", "loading...please wait"},
             info = {"Integrated", "2D", "3D", "and", "Audio", "for", "Java"};
    double[] size = {3, 7, 3, 2, 1},
             startPos = {-500,50,  0,500,  500,50,  6,-10,  0,-50},
             endPos = {-98,50,  0,50,  100,50,  6,-10,  0,-50},
             trigger = {.5, 1.5, 2.5, 4, 5};
    ImageBvr[] introImgs = new ImageBvr[intro.length];
    // Create an array of text images for the introImg.
    for(int i=0; i 1, return 1.
  NumberBvr ramp(double trigger, double rate) {
    NumberBvr rampVal = mul(localTime,toBvr(rate));
    return (NumberBvr) cond(lte(localTime,toBvr(trigger)), toBvr(0),
            cond(lt(rampVal,toBvr(1)), rampVal, toBvr(1)));
  }
} 
//