Jump to content

php & flash


arlabbafi

Recommended Posts

<?
$s = new SWFShape();
$fp = fopen('php-big.jpg','r');
$jpg = new SWFBitmap($fp);
$w = $jpg->getWidth(); $h = $jpg->getHeight();
$f = $s->addFill($jpg);
$f->moveTo(-$w/2, -$h/2);
$s->setRightFill($f);
$s->movePenTo(-$w/2, -$h/2);
$s->drawLine($w, 0);
$s->drawLine(0, $h);
$s->drawLine(-$w, 0);
$s->drawLine(0, -$h);
$p = new SWFSprite();
$i = $p->add($s);
for($step=0; $step<360; $step+=2) {
$p->nextFrame();
$i->rotate(-2);
}
$m = new SWFMovie();
$i = $m->add($p);
$i->moveTo(230,120);
$m->setRate(100);
$m->setDimension($w*1.8, $h*1.;
header('Content-type: application/x-shockwave-flash');
$m->output();
?>

Link to comment
https://forums.phpfreaks.com/topic/159608-php-flash/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.