setDimension(600,400); $movie->setBackground(rand(0,0xFF),rand(0,0xFF),rand(0,0xFF)); $movie->setRate(31); // gradient $gradient=new SWFGradient(); $gradient->addEntry(0.0,255,0,0); $gradient->addEntry(1.0,0,0,255); // circle shape $circleShape =new SWFShape(); $fill=$circleShape->addFill($gradient, SWFFILL_LINEAR_GRADIENT); $fill->scaleTo(0.25); //$fill->moveTo(230,0); $circleShape->setRightFill($fill); $circleShape->drawCircle(95); $i=$movie->add($circleShape); $i->moveTo(200,200); // // square shape $squareShape =new SWFShape(); $fill2=$squareShape->addFill($gradient, SWFFILL_LINEAR_GRADIENT); $fill2->scaleTo(0.125); $fill2->moveTo(-30,0); $squareShape->setLine(0,0,0,0); $squareShape->setRightFill($fill2); $squareShape->drawLine(100,0); $squareShape->drawLine(0,100); $squareShape->drawLine(-100,0); $squareShape->drawLine(0,-100); $i=$movie->add($squareShape); $i->moveTo(300,100); // save swf with same name as filename $swfname = basename(__FILE__,".php"); $movie->save("$swfname.swf",9); ?>