<?
$s = new SWFShape();
$f = $s->addSolidFill(0xff, 0, 0);
$s->setFillStyle1($f);
$s->movePenTo(-500,-500);
$s->drawLineTo(500,-500);
$s->drawLineTo(500,500);
$s->drawLineTo(-500,500);
$s->drawLineTo(-500,-500);
$p = new SWFSprite();
$i = $p->add($s);
$i->setDepth(1);
$p->nextFrame();
for($n=0; $n<5; ++$n)
{
$i->rotate(-15);
$p->nextFrame();
}
$m = new SWFMovie();
$m->setBackground(0xff, 0xff, 0xff);
$m->setDimension(6000,4000);
$i = $m->add($p);
$i->setDepth(1);
$i->moveTo(-500,2000);
$i->setName("box");
$m->add(new SWFAction("x=-100;"));
$m->nextFrame();
$m->add(new SWFAction("x+=5; /box.x=x;"));
$m->nextFrame();
$m->add(new SWFAction("gotoFrame(1); play();"));
$m->nextFrame();
header('Content-type: application/x-shockwave-flash');
$m->output();
?>