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


PHP SWFMovie::setDimension方法代码示例

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


在下文中一共展示了SWFMovie::setDimension方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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:jordanmanning,项目名称:ezpublish,代码行数: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: 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

示例4: SWFShape

//echo "t_max=$t_max<br>";
//echo "wndd_min=$wndd_min<br>";
//echo "wndd_max=$wndd_max<br>";
//echo "wnds_min=$wnds_min<br>";
//echo "wnds_max=$wnds_max<br>";
/* set the graph's x and y dimensions */
$gx = 800;
$gy = 240;
/* Time to create the $gx x $gy image */
/* first creat a blank image */
$im = new SWFShape();
/* use a 1 pixel width black pen */
$im->setLine(1, 0, 0, 0);
/* use a white background */
$mve = new SWFMovie();
$mve->setDimension($gx, $gy);
$mve->setBackground(255, 255, 255);
/* here's a small pallete to use for the graphs (RGB values) */
//black = (0,0,0);
//brown = (255,255,0);
//$red = (255,0,0);
//$yellow = (224,252,24);
//$green = (0,255,0);
//$drkGreen = (0,190,0);
//$blue = (0,0,255);
//$grey = (128,128,128);
//$ltGrey = (192,192,192);
//$ltrGrey = (224,224,224);
/* For a 100 x 100 image:
     (0,0) is the upper left hand corner,
     (100,100) is the lower right hand corner.
开发者ID:BackupTheBerlios,项目名称:wth-svn,代码行数:31,代码来源:wind.swf.php

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

示例6: count

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

示例7: elseif

$equipment_status = 0;
$my_equipment_number = '';
$num_icons = 0;
$this_url = $_SERVER['REQUEST_URI'];
$space_plan_locked = Nexista_Path::get('//get_sp_pointer_by_id/space_plan_locked', 'flow');
if ($space_plan_locked == 'false') {
    $space_plan_locked = false;
} elseif ($space_plan_locked == 'true') {
    $space_plan_locked = true;
}
// ming floorplan generator
Ming_setScale(20.0);
ming_useswfversion(6);
$m = new SWFMovie();
$m->setRate(0);
$m->setDimension($movie_width, $movie_height);
$path = $_SERVER['SCRIPT_FILENAME'];
$path = dirname(dirname($path));
$f = new SWFFont('_sans');
$roles = Nexista_Path::get('//user_roles', 'flow');
$file_path = Nexista_Path::get('//get_sp_pointer_by_id/space_plan_pointer', 'flow');
$x_position = Nexista_Path::get('//get_sp_pointer_by_id/x_position', 'flow');
$y_shift = Nexista_Path::get('//get_sp_pointer_by_id/y_position', 'flow');
//$key_x_position = Nexista_Path::get('//get_sp_pointer_by_id/key_x_position','flow');
//$key_y_position = Nexista_Path::get('//get_sp_pointer_by_id/key_y_position','flow');
$key_x_position = Nexista_Path::get('//runtime/key_x_position', 'flow');
$key_y_position = Nexista_Path::get('//runtime/key_y_position', 'flow');
if ($key_x_position > 775 || $key_x_position < 25) {
    $key_x_position = 600;
}
if ($key_y_position > 775 || $key_y_position < 25) {
开发者ID:savonix,项目名称:internetfloorplans,代码行数:31,代码来源:floorplan_generator.php

示例8: text

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

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

#!/usr/bin/php -c.
<?php 
$m = new SWFMovie();
$m->setDimension(640.0, 480.0);
/* SWF_SETBACKGROUNDCOLOR */
$m->setBackground(0xff, 0xff, 0xff);
/* SWF_SHOWFRAME */
$m->nextFrame();
/* end of frame 1 */
/* SWF_END */
$m->save("test01.swf");
开发者ID:mgorny,项目名称:libming,代码行数:11,代码来源:test01.php

示例11: SWFMovie

<?php

Ming_setScale(20.0);
ming_useswfversion(7);
$movie = new SWFMovie();
$movie->setRate(31);
$movie->setDimension(400, 300);
$movie->setBackground(0xcc, 0xcc, 0xcc);
$filesrc1 = "jpg.jpg";
$filesrc2 = "png.png";
$filesrc3 = "gif.gif";
$filecontents1 = file_get_contents($filesrc1);
$img = new SWFBitmap($filecontents1);
$f1 = $movie->add($img);
$f1->moveto(90, 50);
$filecontents2 = file_get_contents($filesrc2);
$img = new SWFBitmap($filecontents2);
$f1 = $movie->add($img);
$f1->moveto(10, 10);
$filecontents3 = file_get_contents($filesrc3);
$img = new SWFBitmap($filecontents3);
$f1 = $movie->add($img);
$f1->moveto(170, 80);
header('Content-Type: application/x-shockwave-flash');
$movie->output(0);
开发者ID:omyyalliu,项目名称:web,代码行数:25,代码来源:bitmaps.php

示例12: SWFText

$sc->setName("cScore");
$sc->setFont($f);
$sc->setColor(255, 255, 255);
$sc->addString("Computer : 0");
// Write the "signature"
$signature = new SWFText();
$signature->setFont($f);
$signature->setColor(150, 150, 255);
$signature->setHeight(9);
$signature->addString("(c) Armel GRIGNON, october 2001 - See this script at mingshop.arpane.net");
// Now adds the objects to the movie
// Creates the movie and the main sprite
$m = new SWFMovie();
$m->setRate(96);
$m->setBackground(207, 96, 0);
$m->setDimension(640, 480);
// Adds the two rackets (within sprites)
$srp = new SWFSprite();
$srp_shape = $srp->add($rm);
$srp->nextFrame();
$racket_player = $m->add($srp);
$racket_player->moveTo(10, 215);
$racket_player->setName("racketPlayer");
$src = new SWFSprite();
$src->add($rm);
$src->nextFrame();
$racket_computer = $m->add($src);
$racket_computer->moveTo(630, 215);
$racket_computer->setName("racketComputer");
// Adds the "grass"
$grass_top = $m->add($gm);
开发者ID:anovsiradj,项目名称:nextin-coba,代码行数:31,代码来源:ming.php

示例13: SWFAction

     }
     // ESC reloads the current slide
     $b->addAction(new SWFAction("getURL('http://{$_SERVER['HTTP_HOST']}{$baseDir}{$showScript}/{$currentPres}/{$slideNum}','_self');"), swfbutton_keypress(chr(27)));
     // ? brings up the help page
     $b->addAction(new SWFAction("getURL('http://{$_SERVER['HTTP_HOST']}{$baseDir}{$helpPage}','_blank');"), swfbutton_keypress('?'));
     $f = new SWFFont($objs[$coid]->titleFont);
     $m->setBackground(0x66, 0x66, 0x99);
     $t = new SWFText();
     $t->setFont($f);
     $rgb = rgb($objs[$coid]->titleColor);
     $t->setColor($rgb[0], $rgb[1], $rgb[2]);
     $tHeight = flash_fixsize($objs[$coid]->titleSize);
     $t->setHeight($tHeight);
     $tText = $objs[$coid]->title;
     $t->addString($tText);
     $m->setDimension($dx, $dy);
     // Add the text to the movie and position it
     $i = $m->add($t);
     $i->moveTo((int) ($dx / 2) - $t->getWidth($tText) / 2, $dy - round($t->getDescent()) - ($dy - $tHeight) / 2);
     // Don't forget to add the button
     $m->add($b);
     break;
 case 'blurb':
     $m->setBackground(0xff, 0xff, 0xff);
     $m->setDimension($dx, $dy);
     $t = new SWFTextField();
     if (!empty($objs[$coid]->title)) {
         $rgb = rgb($objs[$coid]->titleColor);
         $t->setColor($rgb[0], $rgb[1], $rgb[2]);
         $t = new SWFText();
         $f = new SWFFont($objs[$coid]->font);
开发者ID:rickogden,项目名称:web-pres2,代码行数:31,代码来源:flash.php

示例14: _outFlash

 private static function _outFlash()
 {
     if (!class_exists('SWFBitmap')) {
         return false;
     }
     self::_getCodeLenth();
     self::_creatImage();
     self::_setRandBackground();
     self::_creatBackground();
     //self::_setPicBackground();
     self::_setRandFont();
     self::_setRandGraph();
     self::_writeImage();
     self::_setRandDistortion();
     $_tmpPath = Wind::getRealDir('DATA:tmp.');
     $_tmp = $_tmpPath . WindUtility::generateRandStr(8) . '.png';
     imagepng(self::$_image, $_tmp);
     if (!WindFile::isFile($_tmp)) {
         return false;
     }
     imagedestroy(self::$_image);
     $bit = new SWFBitmap($_tmp);
     $shape = new SWFShape();
     $shape->setRightFill($shape->addFill($bit));
     $shape->drawLine($bit->getWidth(), 0);
     $shape->drawLine(0, $bit->getHeight());
     $shape->drawLine(-$bit->getWidth(), 0);
     $shape->drawLine(0, -$bit->getHeight());
     $movie = new SWFMovie();
     $movie->setDimension($bit->getWidth(), $bit->getHeight());
     $flash = $movie->add($shape);
     header("Pragma:no-cache");
     header("Cache-control:no-cache");
     header('Content-type: application/x-shockwave-flash');
     $movie->output();
     WindFolder::clear($_tmpPath);
 }
开发者ID:latticet,项目名称:EduSoho_jb51,代码行数:37,代码来源:PwGDCode.php

示例15: SWFMovie

             $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 {
             $devicemap[$device]['x'] = $celx;
开发者ID:Akheon23,项目名称:lms,代码行数:31,代码来源:netdevmap.php


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