setRate(20.000000); $movie->setDimension(550, 400); $movie->setFrames(1); $movie->setBackground(rand(0,0xFF),rand(0,0xFF),rand(0,0xFF)); function rect($r, $g, $b) { $s = new SWFShape(); $s->setRightFill($s->addFill($r, $g, $b)); $s->drawLine(100,0); $s->drawLine(0,100); $s->drawLine(-100,0); $s->drawLine(0,-100); return $s; } $myButton = new SWFButton(); $myButton->addShape(rect(0xff, 0, 0), SWFBUTTON_UP | SWFBUTTON_HIT); $myButton->addShape(rect(0, 0xff, 0), SWFBUTTON_OVER); $myButton->addShape(rect(0, 0, 0xff), SWFBUTTON_DOWN); $i = $movie->add($myButton); $i->moveTo(200, 100); // save swf with same name as filename $swfname = basename(__FILE__,".php"); $movie->save("$swfname.swf",9); ?>