• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP SWFMovie类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中SWFMovie的典型用法代码示例。如果您正苦于以下问题:PHP SWFMovie类的具体用法?PHP SWFMovie怎么用?PHP SWFMovie使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了SWFMovie类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getDocument

 /**
  * Returns unique movie object as a parent canvas for all swf objects.
  * 
  * @return SWFMovie
  */
 public function getDocument()
 {
     if ($this->movie === null) {
         ming_setscale(1.0);
         $this->movie = new SWFMovie();
         $this->movie->setDimension($this->modifyCoordinate($this->options->width), $this->modifyCoordinate($this->options->height));
         $this->movie->setRate(1);
         $this->movie->setBackground(255, 255, 255);
     }
     return $this->movie;
 }
开发者ID:mediasadc,项目名称:alba,代码行数:16,代码来源:flash.php


示例2: _flash

 private function _flash()
 {
     $spacing = 5;
     $codewidth = ($this->width - $spacing * 5) / 4;
     $strforswdaction = '';
     for ($i = 0; $i <= 3; $i++) {
         $strforswdaction .= $this->swfcode($codewidth, $spacing, $this->_code[$i], $i + 1);
     }
     ming_setScale(20.0);
     ming_useswfversion(6);
     $movie = new SWFMovie();
     $movie->setDimension($this->width, $this->height);
     $movie->setBackground(255, 255, 255);
     $movie->setRate(31);
     $fontcolor = '0x' . sprintf('%02s', dechex(mt_rand(0, 255))) . sprintf('%02s', dechex(mt_rand(0, 128))) . sprintf('%02s', dechex(mt_rand(0, 255)));
     $strAction = "\n\t\t_root.createEmptyMovieClip ( 'triangle', 1 );\n\t\twith ( _root.triangle ) {\n\t\tlineStyle( 3, {$fontcolor}, 100 );\n\t\t{$strforswdaction}\n\t\t}\n\t\t";
     $movie->add(new SWFAction(str_replace("\r", "", $strAction)));
     header('Content-type: application/x-shockwave-flash');
     $movie->output();
 }
开发者ID:bjtenao,项目名称:tudu-web,代码行数:20,代码来源:Flash.php


示例3: SWFMovie

#!/usr/bin/php -c.

<?php 
$srcdir = $argv[1];
$m = new SWFMovie(9);
$m->setBackground(0xcc, 0xcc, 0xcc);
$s = new SWFShape();
$img = new SWFBitmap($srcdir . "/../Media/image01.dbl");
$fill = $s->addFill($img, SWFFILL_TILED_BITMAP);
$s->setRightFill($fill);
$w = $img->getWidth();
$h = $img->getHeight();
$s->drawLine($w, 0);
$s->drawLine(0, $h);
$s->drawLine(-$w, 0);
$s->drawLine(0, -$h);
$cm = array();
for ($i = 0; $i < 20; $i++) {
    $cm[$i] = 0.1;
}
$cmf = new SWFFilterMatrix(5, 4, $cm);
$filter = new SWFFilter(SWFFILTER_TYPE_COLORMATRIX, $cmf);
$bu = new SWFButton();
$bu->addCharacter($s, SWFBUTTON_UP | SWFBUTTON_HIT | SWFBUTTON_OVER | SWFBUTTON_DOWN);
$item = $m->add($bu);
$item->addFilter($filter);
$m->save("test05.swf");
开发者ID:mgorny,项目名称:libming,代码行数:27,代码来源:test05.php


示例4: ming_useswfversion

<?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


示例5: SWFFont

<?php

$f = new SWFFont(dirname(__FILE__) . '/i/captcha/fonts/anke_calligraph.ttf');
$m = new SWFMovie();
$m->setRate(24.0);
$m->setDimension(520, 320);
$m->setBackground(251, 121, 34);
function text($r, $g, $b, $a, $rot, $x, $y, $scale, $string)
{
    global $f, $m;
    $t = new SWFText();
    $t->setFont($f);
    $t->setColor($r, $g, $b, $a);
    $t->setHeight(96);
    $t->moveTo(-$t->getWidth($string) / 2, 32);
    $t->addString($string);
    $i = $m->add($t);
    $i->rotateTo($rot);
    $i->moveTo($x, $y);
    $i->scale($scale, $scale);
    return $i;
}
$colorr[1] = 255 * 0.85;
$colorg[1] = 255 * 0.85;
$colorb[1] = 255 * 0.85;
$colorr[2] = 255 * 0.9;
$colorg[2] = 255 * 0.9;
$colorb[2] = 255 * 0.9;
$colorr[3] = 255 * 0.95;
$colorg[3] = 255 * 0.95;
$colorb[3] = 255 * 0.95;
开发者ID:Gerst20051,项目名称:HnS-Desktop,代码行数:31,代码来源:swfname.php


示例6: 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


示例7: dheader

        } else {
            dheader('Content-type: image/jpeg');
            imagejpeg($im, '', 100);
        }
        imagedestroy($im);
    }
} elseif ($seccodedata['type'] == 2 && extension_loaded('ming')) {
    $spacing = 5;
    $codewidth = ($seccodedata['width'] - $spacing * 5) / 4;
    $strforswdaction = '';
    for ($i = 0; $i <= 3; $i++) {
        $strforswdaction .= seccode_swfcode($codewidth, $spacing, $seccode[$i], $i + 1);
    }
    ming_setScale(20.0);
    ming_useswfversion(6);
    $movie = new SWFMovie();
    $movie->setDimension($seccodedata['width'], $seccodedata['height']);
    $movie->setBackground(255, 255, 255);
    $movie->setRate(31);
    $fontcolor = '0x' . sprintf('%02s', dechex(mt_rand(0, 255))) . sprintf('%02s', dechex(mt_rand(0, 128))) . sprintf('%02s', dechex(mt_rand(0, 255)));
    $strAction = "\r\n\t_root.createEmptyMovieClip ( 'triangle', 1 );\r\n\twith ( _root.triangle ) {\r\n\tlineStyle( 3, {$fontcolor}, 100 );\r\n\t{$strforswdaction}\r\n\t}\r\n\t";
    $movie->add(new SWFAction(str_replace("\r", "", $strAction)));
    header('Content-type: application/x-shockwave-flash');
    $movie->output();
} else {
    $numbers = array('B' => array('00', 'fc', '66', '66', '66', '7c', '66', '66', 'fc', '00'), 'C' => array('00', '38', '64', 'c0', 'c0', 'c0', 'c4', '64', '3c', '00'), 'E' => array('00', 'fe', '62', '62', '68', '78', '6a', '62', 'fe', '00'), 'F' => array('00', 'f8', '60', '60', '68', '78', '6a', '62', 'fe', '00'), 'G' => array('00', '78', 'cc', 'cc', 'de', 'c0', 'c4', 'c4', '7c', '00'), 'H' => array('00', 'e7', '66', '66', '66', '7e', '66', '66', 'e7', '00'), 'J' => array('00', 'f8', 'cc', 'cc', 'cc', '0c', '0c', '0c', '7f', '00'), 'K' => array('00', 'f3', '66', '66', '7c', '78', '6c', '66', 'f7', '00'), 'M' => array('00', 'f7', '63', '6b', '6b', '77', '77', '77', 'e3', '00'), 'P' => array('00', 'f8', '60', '60', '7c', '66', '66', '66', 'fc', '00'), 'Q' => array('00', '78', 'cc', 'cc', 'cc', 'cc', 'cc', 'cc', '78', '00'), 'R' => array('00', 'f3', '66', '6c', '7c', '66', '66', '66', 'fc', '00'), 'T' => array('00', '78', '30', '30', '30', '30', 'b4', 'b4', 'fc', '00'), 'V' => array('00', '1c', '1c', '36', '36', '36', '63', '63', 'f7', '00'), 'W' => array('00', '36', '36', '36', '77', '7f', '6b', '63', 'f7', '00'), 'X' => array('00', 'f7', '66', '3c', '18', '18', '3c', '66', 'ef', '00'), 'Y' => array('00', '7e', '18', '18', '18', '3c', '24', '66', 'ef', '00'), '2' => array('fc', 'c0', '60', '30', '18', '0c', 'cc', 'cc', '78', '00'), '3' => array('78', '8c', '0c', '0c', '38', '0c', '0c', '8c', '78', '00'), '4' => array('00', '3e', '0c', 'fe', '4c', '6c', '2c', '3c', '1c', '1c'), '6' => array('78', 'cc', 'cc', 'cc', 'ec', 'd8', 'c0', '60', '3c', '00'), '7' => array('30', '30', '38', '18', '18', '18', '1c', '8c', 'fc', '00'), '8' => array('78', 'cc', 'cc', 'cc', '78', 'cc', 'cc', 'cc', '78', '00'), '9' => array('f0', '18', '0c', '6c', 'dc', 'cc', 'cc', 'cc', '78', '00'));
    foreach ($numbers as $i => $number) {
        for ($j = 0; $j < 6; $j++) {
            $a1 = substr('012', mt_rand(0, 2), 1) . substr('012345', mt_rand(0, 5), 1);
            $a2 = substr('012345', mt_rand(0, 5), 1) . substr('0123', mt_rand(0, 3), 1);
            mt_rand(0, 1) == 1 ? array_push($numbers[$i], $a1) : array_unshift($numbers[$i], $a1);
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:seccode.php


示例8: XML_RSS

<?php

require 'XML/RSS.php';
$r =& new XML_RSS('slashdot.rdf');
$r->parse();
$allItems = $r->getItems();
$itemCount = count($allItems);
$width = 1000;
$m = new SWFMovie();
$m->setDimension($width, 70);
$m->setBackground(0xcf, 0xcf, 0xcf);
$f = new SWFFont("../../../fonts/Techno.fdb");
$hit = new SWFShape();
$hit->setRightFill($hit->addFill(0, 0, 0));
$hit->movePenTo(-($width / 2), -30);
$hit->drawLine($width, 0);
$hit->drawLine(0, 60);
$hit->drawLine(-$width, 0);
$hit->drawLine(0, -60);
$x = 0;
// build the buttons
foreach ($allItems as $Item) {
    $title = $Item['title'];
    $link = $Item['link'];
    // get the text
    $t = new SWFText();
    $t->setFont($f);
    $t->setHeight(50);
    $t->setColor(0, 0, 0);
    $t->moveTo(-$f->getWidth($title) / 2, 25);
    $t->addString($title);
开发者ID:SandyS1,项目名称:presentations,代码行数:31,代码来源:ming2.php


示例9: SWFMovie

<?php

$m = new SWFMovie();
$m->setDimension(400, 100);
$m->setBackground(0xff, 0xff, 0xff);
$m->add(new SWFBitmap(fopen("img/xampp-logo.jpg", "rb")));
for ($i = 0; $i <= 100; $i++) {
    $m->add(new SWFAction("alpha = {$i};"));
    $m->nextFrame();
}
header('Content-type: application/x-shockwave-flash');
$m->output();
开发者ID:omyyalliu,项目名称:web,代码行数:12,代码来源:splash-logo.php


示例10: SWFShape

<?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();
开发者ID:anovsiradj,项目名称:nextin-coba,代码行数:16,代码来源:ming3.php


示例11: SWFShape

<?php

$s = new SWFShape();
$fp = fopen('../../intro/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.8);
header('Content-type: application/x-shockwave-flash');
$m->output(6);
开发者ID:SandyS1,项目名称:presentations,代码行数:28,代码来源:ming.php


示例12: Ming_setScale

         if ($idy > $maxy) {
             $maxy = $idy;
         }
     }
 }
 $widthx = $maxx - $minx;
 $widthy = $maxy - $miny;
 $cellw = 70;
 $cellh = 30;
 $celltmargin = 20;
 $celllmargin = 10;
 $imgwx = $cellw * ($widthx + 2);
 $imgwy = $cellh * ($widthy + 2);
 Ming_setScale(20.0);
 ming_useswfversion(5);
 $m = new SWFMovie();
 $m->setDimension($imgwx, $imgwy);
 $font = new SWFFont("img/Arial.fdb");
 $connections = new SWFShape();
 foreach ($map as $idx => $x) {
     foreach ($x as $idy => $device) {
         $celx = $idx - $minx;
         $cely = $idy - $miny;
         if (preg_match('/^n/', $device)) {
             $device = str_replace('n', '', $device);
             list($nodeid, $device, $linktype) = explode('.', $device);
             $nodemap[$nodeid]['x'] = $celx;
             $nodemap[$nodeid]['y'] = $cely;
             $nodemap[$nodeid]['device'] = $device;
             $nodemap[$nodeid]['linktype'] = $linktype;
         } else {
开发者ID:Akheon23,项目名称:lms,代码行数:31,代码来源:netdevmap.php


示例13: 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


示例14: ming_useswfversion

ming_useswfversion(4);
$s = new SWFShape();
$f = $s->addFill(0xff, 0, 0);
$s->setRightFill($f);
$s->movePenTo(-500, -500);
$s->drawLineTo(500, -500);
$s->drawLineTo(500, 500);
$s->drawLineTo(-500, 500);
$s->drawLineTo(-500, -500);
$p = new SWFSprite();
$i = $p->add($s);
$i->setDepth(1);
$p->nextFrame();
for ($n = 0; $n < 5; ++$n) {
    $i->rotate(-15);
    $p->nextFrame();
}
$m = new SWFMovie();
$m->setBackground(0xff, 0xff, 0xff);
$m->setDimension(6000, 4000);
$i = $m->add($p);
$i->setDepth(1);
$i->moveTo(-500, 2000);
$i->setName("box");
$m->add(new SWFAction("/box.x += 3;"));
$m->nextFrame();
$m->add(new SWFAction("gotoFrame(0); play();"));
$m->nextFrame();
header('Content-type: application/x-shockwave-flash');
$m->output();
开发者ID:anovsiradj,项目名称:nextin-coba,代码行数:30,代码来源:ming2.php


示例15: dl

<?php

echo "extension_dir={$extension_dir}<br>";
if (!extension_loaded('ming')) {
    $exLoad = "fal";
    $retDL = dl('php_ming.so');
    echo "retDL={$retDL}<br>";
} else {
    $exLoad = "tru";
}
echo "exLoad={$exLoad}<br>";
exit;
$mov = new SWFMovie();
$mov->setDimension();
header('Content-type: application/x-shockwave-flash');
$mov->output();
开发者ID:RaymondByczko,项目名称:portfoliobase,代码行数:16,代码来源:ming1.php


示例16: 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


示例17: SWFMovie

#!/usr/bin/php -c.
<?php 
$m = new SWFMovie();
$s = new SWFShape();
$s->setLine(1, 255, 0, 0, 255);
$s->setRightFill(255, 255, 0, 255);
$s->drawLine(100, 0);
$s->drawLine(0, 40);
$s->drawLineTo(0, 0);
$b = new SWFButton();
$br1 = $b->addCharacter($s, SWFBUTTON_HIT | SWFBUTTON_UP | SWFBUTTON_OVER | SWFBUTTON_DOWN);
$br2 = $b->addCharacter($s, SWFBUTTON_OVER | SWFBUTTON_DOWN);
$br2->rotate(10);
$br2->move(20, 0);
$br3 = $b->addCharacter($s, SWFBUTTON_DOWN);
$br3->rotate(20);
$br3->move(40, 0);
$d = $m->add($b);
$d->moveTo(50, 100);
$m->addExport($b, "ButtonExport");
$m->writeExports();
$m->nextFrame;
$m->save("test02.swf");
?>
	
	

开发者ID:mgorny,项目名称:libming,代码行数:24,代码来源:test02.php


示例18: include

<?php
    include('../Arabic.php');
    $Arabic = new Arabic('ArGlyphs');

    $text_before = 'اللغة العربية';
    $text_after = $Arabic->utf8Glyphs($text_before);

    $f = new SWFFont(dirname(__FILE__).'/GD/ae_AlHor.ttf');

    $m = new SWFMovie();
    $m->setRate(24.0);
    $m->setDimension(520, 320);
    $m->setBackground(105, 121, 47);

    // This functions was based on the example from
    // http://ming.sourceforge.net/examples/animation.html

    function text($r, $g, $b, $a, $rot, $x, $y, $scale, $string) {
        global $f, $m;

        $t = new SWFText();
        $t->setFont($f);
        $t->setColor($r, $g, $b, $a);
        $t->setHeight(96);
        $t->moveTo(-($t->getWidth($string)) / 5, 32);
        $t->addUTF8String($string);

        $i = $m->add($t);
        $i->rotateTo($rot);
        $i->moveTo($x, $y);
        $i->scale($scale, $scale);
开发者ID:nosheenali,项目名称:Zamana,代码行数:31,代码来源:ArGlyphs_SWF.php


示例19: rand

// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
$values["A"] = rand(20, 230);
$values["B"] = rand(20, 230);
$values["C"] = rand(20, 230);
$values["D"] = rand(20, 230);
$values["E"] = rand(20, 230);
$values["F"] = rand(20, 270);
$values["G"] = rand(20, 270);
$values["H"] = rand(20, 270);
$max = 270;
$width = 540;
$height = 320;
$m = new SWFMovie();
$m->setDimension($width, $height);
$m->setBackground(251, 121, 34);
$m->setRate(30.0);
$font = new SWFFont("BabelSans-B.fdb");
$g = new SWFGradient();
$g->addEntry(0.0, 0, 0, 0);
$g->addEntry(1.0, 0xff, 0xff, 0xff);
function box($w, $h)
{
    global $g;
    $s = new SWFShape();
    $f = $s->addFill($g, SWFFILL_LINEAR_GRADIENT);
    $f->scaleTo(0.05);
    $s->setRightFill($f);
    //$s->setRightFill($s->addFill(255,255,255));
开发者ID:omyyalliu,项目名称:web,代码行数:31,代码来源:mingstats_swf.php


示例20: SWFMovie

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Sabre_DAV_Server类代码示例发布时间:2022-05-23
下一篇:
PHP STemplate类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap