Listing 8

SWFSprite *movieclip=new SWFSprite();
const float frames=60;
for(double rot=0;rot<(M_PI*2);rot+=(M_PI*2)/frames){
    pie.draw(movieclip,wd/2,ht/2,r,r,rot);
    movieclip->nextFrame();
    }
movie->add(movieclip);
movie->nextFrame();