Flash video example using very simple .flv : Ming functions for Flash : Functions PHP Source Code


PHP Source Code » Functions » Ming functions for Flash »

 

Flash video example using very simple .flv


<?
/********************************************************************************
* @ File: video.php
* @ Original date: 2004 @ www16.brinkster.com/gazb/ming/
* @ Version: 1.2
* @ Summary:  flash video example using very simple .flv
* @ 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
********************************************************************************/
// based on http://klaus.geekserver.net/ming-video/index.html
// some typical movie variables
Ming_setScale(20.0000000);
ming_useswfversion(6);
$movie=new SWFMovie(6);
$movie->setDimension(550,400);
$movie->setBackground(rand(0,0xFF),rand(0,0xFF),rand(0,0xFF));
$movie->setRate(12);

$stream = new SWFVideoStream(fopen("flv1.flv""rb"));
$m1=$movie->add($stream);
$m1->moveto(100,100);
for(
$i 0$i $stream->getNumFrames(); $i++) {
$movie->nextFrame();
}

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