//全局变量
PRivate BranchGroup sceneBG;
private JMFMovieScreen ms; //动画屏幕
private TimeBehavior timer; //更新屏幕
private void addMovieScreen(String fnm)
{
//把fnm形式的动画投放到动画屏幕上
ms = new JMFMovieScreen(new Point3f(1.5f, 0, -1), 2.0f, fnm);
sceneBG.addChild(ms);
//为animating动画建立计时器对象
timer = new TimeBehavior(40, ms);
//更新动画每40ms一次(25帧/秒)
timer.setSchedulingBounds(bounds);
sceneBG.addChild(timer);
}
ImageComponent2D ic = new ImageComponent2D(
ImageComponent2D.FORMAT_RGB,
FORMAT_SIZE, FORMAT_SIZE, true, true);
新闻热点
疑难解答