本文整理汇总了PHP中SWFMovie::save方法的典型用法代码示例。如果您正苦于以下问题:PHP SWFMovie::save方法的具体用法?PHP SWFMovie::save怎么用?PHP SWFMovie::save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SWFMovie
的用法示例。
在下文中一共展示了SWFMovie::save方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: imageSWF
function imageSWF()
{
/* parse arguments */
$numargs = func_num_args();
$image = func_get_arg(0);
$swfname = "";
if ($numargs > 1) {
$swfname = func_get_arg(1);
}
/* image must be in jpeg and
convert jpeg to SWFBitmap
can be done by buffering it */
ob_start();
imagejpeg($image);
$buffimg = ob_get_contents();
ob_end_clean();
$img = new SWFBitmap($buffimg);
$w = $img->getWidth();
$h = $img->getHeight();
$movie = new SWFMovie();
$movie->setDimension($w, $h);
$movie->add($img);
if ($swfname) {
$movie->save($swfname);
} else {
$movie->output;
}
}
示例2: SWFMovie
#!/usr/bin/php -c.
<?php
$m = new SWFMovie(7);
/* SWF_SETBACKGROUNDCOLOR */
$m->setBackground(0xff, 0xff, 0xff);
/* SWF_SHOWFRAME */
$m->nextFrame();
/* end of frame 1 */
/* SWF_END */
$m->save("test05.swf");
示例3: SWFMovie
#!/usr/bin/php -c.
<?php
$m = new SWFMovie();
/* SWF_SETBACKGROUNDCOLOR */
$m->setBackground(0xff, 0xff, 0xff);
/* SWF_DEFINESPRITE */
/* MovieClip 1 */
$character1 = new SWFMovieClip();
/* 1 frames */
/* SWF_SHOWFRAME */
$character1->nextFrame();
/* end of clip frame 1 */
/* SWF_END */
/* SWF_PLACEOBJECT2 */
/* PlaceFlagHasCharacter */
$m->add($character1);
/* PlaceFlagHasMatrix */
/* outputSWF_MATRIX is broken, so it is being skipped.. */
/* SWF_SHOWFRAME */
$m->nextFrame();
/* end of frame 1 */
/* SWF_END */
$m->save("test02.swf");
示例4: SWFMovie
#!/usr/bin/php -c.
<?php
$m = new SWFMovie(6);
/* SWF_SETBACKGROUNDCOLOR */
$m->setBackground(0xff, 0xff, 0xff);
/* SWF_SHOWFRAME */
$m->nextFrame();
/* end of frame 1 */
/* SWF_END */
$m->save("test04.swf");
示例5: SWFMovie
#!/usr/bin/php -c.
<?php
$m = new SWFMovie(8);
$m->setBackground(0, 0, 0);
$m->save("test07.swf");
示例6: explode
<?php
include_once '../init_constants.php';
// this can stay since it's only called via web
ming_useswfversion(6);
$parts = explode('/', $_SERVER['REDIRECT_URL']);
$swf = $parts[count($parts) - 1];
$swfBase = basename($swf, '.swf');
$swfParts = explode('_', $swfBase);
$height = array_pop($swfParts);
$width = array_pop($swfParts);
$m = new SWFMovie();
$m->setDimension($width, $height);
$m->setrate(30);
$m->add(new SWFAction('this.createEmptyMovieClip("container_mc", 1);'));
$m->add(new SWFAction('__d = new Date();'));
$m->add(new SWFAction('loadMovie("http://' . FF_SERVER_NAME . '/swf/slideshow/slide_show_prototype.swf?__dynTS="+__d.getTime(),"container_mc");'));
$m->setBackground(0, 0, 0);
$m->save($finalPath = PATH_HOMEROOT . PATH_SWF . '/container/dynamic/' . $swf);
echo $finalPath . ' was created. <a href="javascript:history.go(-1);">Go back</a>.';
示例7: SWFMovie
#!/usr/bin/php -c.
<?php
$m = new SWFMovie(8);
$m->save("test06.swf");
示例8: SWFMovie
<?php
$m = new SWFMovie(8);
ming_setscale(1.0);
/*Unknown block type 69*/
/* SWF_DEFINESHAPE3 */
/* Shape 1 (TYPE=3, RECT=0,0 0,0)*/
$character1 = new SWFShape();
/*2 fillstyle(s)*/
$character1_f0_red = 0x20;
$character1_f0_green = 0x40;
$character1_f0_blue = 0x80;
$character1_f0_alpha = 0xdf;
$character1_f0 = $character1->addSolidFill($character1_f0_red, $character1_f0_green, $character1_f0_blue, $character1_f0_alpha);
/*SWFFILL_SOLID*/
$character1_f1_red = 0x40;
$character1_f1_green = 0x80;
$character1_f1_blue = 0x20;
$character1_f1_alpha = 0x18;
$character1_f1 = $character1->addSolidFill($character1_f1_red, $character1_f1_green, $character1_f1_blue, $character1_f1_alpha);
/*SWFFILL_SOLID*/
/*0 linestyles(s)*/
/* SWF_PLACEOBJECT2 */
$i1 = $m->add($character1);
$i1->setDepth(1);
/* PlaceFlagHasMatrix */
/* SWF_SHOWFRAME */
$m->nextFrame();
/* end of frame 1 */
/* SWF_END */
$m->save("test01.swf");
示例9: SWFMovie
#!/usr/bin/php -c.
<?php
$m = new SWFMovie();
/* SWF_SETBACKGROUNDCOLOR */
$m->setBackground(0xff, 0xff, 0xff);
/* SWF_SHOWFRAME */
$m->nextFrame();
/* end of frame 1 */
/* SWF_END */
$m->save("test03.swf");
示例10: SWFMovie
#!/usr/bin/php
<?php
$m = new SWFMovie(8);
$shape = new SWFShape();
$gradient = new SWFGradient();
$gradient->addEntry(0, 255, 0, 0, 255);
$gradient->addEntry(0.25, 0x80, 0x20, 0x20, 0xff);
$gradient->addEntry(0.8, 0x40, 0x40, 0x40, 0xff);
$fill = $shape->addGradientFill($gradient, SWFFILL_LINEAR_GRADIENT);
#$fill->moveTo(-163, -163); # this is added by swftoscript, but is wrong
$shape->setLine(1, 0, 0, 0, 255);
$shape->setRightFill($fill);
$shape->drawLine(100, 0);
$shape->drawLine(0, 100);
$shape->drawLine(-100, 0);
$shape->drawLine(0, -100);
$m->add($shape);
$m->save("test08.swf");