Jpg2swf Adding a jpg image to a movie using ming : Ming functions for Flash : Functions PHP Source Code


PHP Source Code » Functions » Ming functions for Flash »

 

Jpg2swf Adding a jpg image to a movie using ming


adding a jpg to a movie using ming 0.3


<?
/********************************************************************************
* @ File: jpg.php
* @ Original date: August 2005 @ www16.brinkster.com/gazb/ming/
* @ Version: 1.2
* @ Summary: adding a jpg 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="jpg.jpg";

// add it and move it to x:50 y:50
$jpg = new SWFBitmap(fopen($img,"rb")); 
$f1 $movie->add($jpg);
$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