note 15687 rejected from function.swfbitmap by zak

From: Date: Wed, 26 Sep 2001 16:50:58 +0000
Subject: note 15687 rejected from function.swfbitmap by zak
Groups: php.notes 
Request: Send a blank email to php-notes+get-18328@lists.php.net to get a copy of this message
Hi, I am writing software that opens a jpg image clips it and then uses ming to export it as a swf movie. I tried all the examples provided on this screen but all I get is a blank screen . My browser receives the input from php, treats it like a swf movie. The swf movie and the original image even have the right size... I skimmed the manual and looked at a morph example provided in the notes. It worked. I tweaked the code to only show an image, it is provided below. Has this happened to anyone else. Does anyone have code to simply transform a jpg image to a swf movie and show it? I am using php-4.0.5 and ming-0.1.1 Thanks for any help. Miguel Feitosa <?php $p = new SWFMorph(); $b = new SWFBitmap("ming.jpg"); $width = $b->getWidth(); $height = $b->getHeight(); $s = $p->getShape1(); $f = $s->addFill($b, SWFFILL_TILED_BITMAP); $f->moveTo(-$width/2, -$height/2); $s->setLeftFill($f); $s->movePenTo(-$width/2, -$height/4); $s->drawLine($width, 0); $s->drawLine(0, $height/2); $s->drawLine(-$width, 0); $s->drawLine(0, -$height/2); $s = $p->getShape2(); $f = $s->addFill($b, SWFFILL_TILED_BITMAP); $f->moveTo(-$width/4, -$height/2); $f->scaleTo(1.0, 1.0); $s->setLeftFill($f); $s->movePenTo(-$width/4, -$height/2); $s->drawLine($width/2, 0); $s->drawLine(0, $height); $s->drawLine(-$width/2, 0); $s->drawLine(0, -$height); $m = new SWFMovie(); $m->setDimension($width, $height); $i = $m->add($p); $i->moveTo($width/2, $height/2); $n=1; $i->setRatio(1); $m->nextFrame(); header('Content-type: application/x-shockwave-flash'); $m->output(); ?>

« previous php.notes (#18328) next »