Here's a flash generator. Name it index.php
<?php
$s = new SWFShape();
$s->setLine(4, 0x7f, 0, 0);
$s->setRightFill($s->addFill(0xff, 0, 0));
$s->movePenTo(10, 10);
$s->drawLineTo(310, 10);
$s->drawLineTo(310, 230);
$s->drawCurveTo(10, 230, 10, 10);
$m = new SWFMovie();
$m->setDimension(320, 240);
$m->setRate(12.0);
$m->add($s);
$m->nextFrame();
header('Content-type: application/x-shockwave-flash');
$m->output();
?>
$s = new SWFShape();
$s->setLine(4, 0x7f, 0, 0);
$s->setRightFill($s->addFill(0xff, 0, 0));
$s->movePenTo(10, 10);
$s->drawLineTo(310, 10);
$s->drawLineTo(310, 230);
$s->drawCurveTo(10, 230, 10, 10);
$m = new SWFMovie();
$m->setDimension(320, 240);
$m->setRate(12.0);
$m->add($s);
$m->nextFrame();
header('Content-type: application/x-shockwave-flash');
$m->output();
?>
Then this is a file that show the flash. Name it hello.php
<h1>This is a flash moview</h1>
<object width="100" height="50">
<param name="movie" value="somefilename.swf">
<embed src="index.php" width="100" height="50">
</embed>
</object>
<object width="100" height="50">
<param name="movie" value="somefilename.swf">
<embed src="index.php" width="100" height="50">
</embed>
</object>
Learn more here http://ming.sourceforge.net/examples/index.html
No comments:
Post a Comment