Re: Wierdness in squares
[email protected] (Wolfgang Hamann) Sat, 13 Sep 2003 00:13:28 +0200 (CEST)
| Newsgroups | gmane.comp.web.ming.general |
|---|---|
| Message-ID | <wolfgang-1030913001328.A0520805@loopback> |
Hi,
this one works for me (BTW, I do not understand your switch / case thing....)
<?
$movie = new SWFMovie();
$movie->setDimension(550,400);
$movie->setRate(60);
// a black shape, our base shape
$shape = new SWFShape();
$shape->setRightFill(0,0,0);
$shape->drawLine(5,0);
$shape->drawLine(0,5);
$shape->drawLine(-5,0);
$shape->drawLineTo(0,0);
// random stuff
$data = array(
array(10, 50, 13, 130, 220, 0),
array(2.2, 80, 80, 0, 0, 254),
array(2.5, 70, 45, 255, 0, 0),
array(18, 100, 100, 0, 255, 0)
);
foreach ($data as $one)
{ $object = $movie->add($shape);
$object->scaleTo($one[0], $one[0]);
$object->moveTo($one[1], $one[2]);
$object->addColor($one[3], $one[4], $one[5]);
}
header("Content-type: application/x-shockwave-flash");
$movie->output();
?>
WOlfgang