当前位置: 首页>>代码示例>>PHP>>正文


PHP SWFMovie::save方法代码示例

本文整理汇总了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;
     }
 }
开发者ID:hyrmedia,项目名称:modules,代码行数:28,代码来源:class.imageconverter.inc.php

示例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");
开发者ID:mgorny,项目名称:libming,代码行数:10,代码来源:test05.php

示例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");
开发者ID:mgorny,项目名称:libming,代码行数:23,代码来源:test02.php

示例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");
开发者ID:mgorny,项目名称:libming,代码行数:10,代码来源:test04.php

示例5: SWFMovie

#!/usr/bin/php -c.
<?php 
$m = new SWFMovie(8);
$m->setBackground(0, 0, 0);
$m->save("test07.swf");
开发者ID:mgorny,项目名称:libming,代码行数:5,代码来源:test07.php

示例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>.';
开发者ID:jmathai,项目名称:photos,代码行数:20,代码来源:dynamic_swf_generator.php

示例7: SWFMovie

#!/usr/bin/php -c.
<?php 
$m = new SWFMovie(8);
$m->save("test06.swf");
开发者ID:mgorny,项目名称:libming,代码行数:4,代码来源:test06.php

示例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");
开发者ID:mgorny,项目名称:libming,代码行数:30,代码来源:test01.php

示例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");
开发者ID:mgorny,项目名称:libming,代码行数:10,代码来源:test03.php

示例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");
开发者ID:mgorny,项目名称:libming,代码行数:18,代码来源:test08.php


注:本文中的SWFMovie::save方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。