setDimension(550,400); $movie->setBackground(rand(0,0xFF),rand(0,0xFF),rand(0,0xFF)); $movie->setRate(31); // draw a red square $squareshape=new SWFShape(); $squareshape->setRightFill(255,0,0); $squareshape->movePenTo(-5,-5); $squareshape->drawLine(20,0); $squareshape->drawLine(0,20); $squareshape->drawLine(-20,0); $squareshape->drawLine(0,-20); // add red squares with ascending skews to movie for($j=50; $j<300; $j+=100) { for($i=25; $i<500; $i+=25) { $squaresymbol=$movie->add($squareshape); $squaresymbol->moveTo($i,$j); $skew+=0.05; // skewYTo is absolute (ie set skew to -1) $squaresymbol->skewYTo ($skew); } } // save swf with same name as filename $swfname = basename(__FILE__,".php"); $movie->save("$swfname.swf",9); ?>