Png2swf Adding a png Image to a movie using ming : Ming functions for Flash : Functions PHP Source Code


PHP Source Code » Functions » Ming functions for Flash »

 

Png2swf Adding a png Image to a movie using ming


adding a png to a movie using ming 0.3

<?
/********************************************************************************
* @ File: png.php
* @ Original date: August 2005 @ www16.brinkster.com/gazb/ming/
* @ Version: 1.2
* @ Summary: basic adding a png to a movie using ming 0.3
* @ Updated:  small improvements and summary text
* @ Copyright (c) 2003-2007, www.gazbming.com - all rights reserved.
* @ Author: gazb.ming [[@]] gmail.com - www.gazbming.com 
* @ Released under GNU Lesser General Public License - http://www.gnu.org/licenses/lgpl.html
********************************************************************************/

// some typical movie variables
Ming_setScale(20.0000000);
$movie=new SWFMovie();
$movie->setDimension(550,400);
$movie->setBackground(rand(0,0xFF),rand(0,0xFF),rand(0,0xFF));

// image to add to movie
$img="png.png";

// add it and move it to x:50 y:50
$png = new SWFBitmap(fopen($img,"rb")); 
$f1 $movie->add($png);
$f1->moveTo(50,50);

// save swf with same name as filename
$swfname basename(__FILE__,".php");
$movie->save("$swfname.swf",9);
?>


HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Functions
» Ming functions for Flash