setRate(20.000000); $movie->setDimension(550, 400); $movie->setFrames(1); $movie->setBackground(rand(0,0xFF),rand(0,0xFF),rand(0,0xFF)); $squareshape=new SWFShape(); $squareshape->setRightFill(255,0,0); $squareshape->movePenTo(-50,-50); $squareshape->drawLine(100,0); $squareshape->drawLine(0,100); $squareshape->drawLine(-100,0); $squareshape->drawLine(0,-100); $squaresymbol=$movie->add($squareshape); $squaresymbol->moveTo(250,200); for($i=0; $i<20; $i++) { $squaresymbol->multColor(1.0-$i/10, 1.0, 1.0); $squaresymbol->addColor(0xff*$i/20, 0, 0); $movie->nextFrame(); } for($i=20; $i>0; $i--) { $squaresymbol->multColor(1.0-$i/10, 1.0, 1.0); $squaresymbol->addColor(0xff*$i/20, 0, 0); $movie->nextFrame(); } // save swf with same name as filename $swfname = basename(__FILE__,".php"); $movie->save("$swfname.swf",9); ?>