setRate(20.000000); $movie->setDimension(550, 400); $movie->setFrames(1); $movie->setBackground(rand(0,0xFF),rand(0,0xFF),rand(0,0xFF)); // just a function to draw bevelled rectangles function makebevel($w,$h,$bv,$r,$g,$b,$l,$d){ $myshape=new SWFShape(); //$myshape->setLine(0,0,0,0); $myshape->setRightFill($r,$g,$b); $myshape->drawLine($w,0); $myshape->drawLine(0,$h); $myshape->drawLine(-$w,0); $myshape->drawLine(0,-$h); // top $myshape->setRightFill($l,$l,$l); $myshape->drawLine(-$bv,-$bv); $myshape->drawLine($w+(2*$bv),0); $myshape->drawLine(-$bv,$bv); $myshape->drawLine(-$w,0); // left $myshape->setRightFill($l,$l,$l); $myshape->drawLine(0,$h); $myshape->drawLine(-$bv,$bv); $myshape->drawLine(0,-$h-(2*$bv)); $myshape->drawLine($bv,$bv); $myshape->movePenTo(0, $h); //bottom $myshape->setRightFill($d,$d,$d); $myshape->drawLine($w,0); $myshape->drawLine($bv,$bv); $myshape->drawLine(-$w-(2*$bv),0); $myshape->drawLine($bv,-$bv); $myshape->movePenTo($w,$h); // right $myshape->setRightFill($d,$d,$d); $myshape->drawLine(0,-$h); $myshape->drawLine($bv,-$bv); $myshape->drawLine(0,$h+(2*$bv)); $myshape->drawLine(-$bv,-$bv); return $myshape; // usage width,height,bevel,RGB,lite,dark //$mybevel= makebevel(280,200,2,0xaa,0x66,0x66,0xee,0x11); }; // make a shape $mybevelshape= makebevel(300,200,4,0xaa,0x66,0x66,0xee,0x11); // add shape to holder sprite $holder= new SWFSprite(); $f1 = $holder->add($mybevelshape); $holder->nextFrame(); // give holder sprite linkage 'bev' $movie->addExport($holder, 'bev'); // export 'bev' in frame 1 $movie->writeExports(); //$movie->nextFrame(); // attachMovie 'bev' $strAction = " _root.attachMovie('bev','bev1',11); bev1.useHandCursor=0;bev1._x=100;bev1._y=100; bev1.onPress=function(){ this.startDrag('');}; bev1.onRelease= bev1.onReleaseOutside=function(){ stopDrag();}; "; // save swf with same name as filename $swfname = basename(__FILE__,".php"); $movie->save("$swfname.swf",9); ?>