grab jpgs from specified directories and create a swf slideshow...
jpg slideshow
<?
/********************************************************************************
* @ File: slideshow.php
* @ Original date: October 2003 @ www16.brinkster.com/gazb/ming/
* @ Version: 2.0
* @ Summary: grab jpgs from folders and create a swf slideshow
* @ 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
********************************************************************************/
// just put the directories with the jpgs here and compile
$pathtojpgs= array();
$pathtojpgs[0]= "./";
//$pathtojpgs[1]= "C:/ming/jpgs/";
//$pathtojpgs[2]= "../mingwin/";
//$pathtojpgs[3]= "/usr/share/Eterm/pix/tile/";
//$pathtojpgs[4]= "./pics/";
// some typical movie variables
Ming_setScale(20.0000000);
ming_useswfversion(6);
$movie=new SWFMovie();
$movie->setBackground(rand(0,0xFF),rand(0,0xFF),rand(0,0xFF));
$movie->setRate(31);
$movie->setDimension(550,400);
//// easing equation converted to php from Actionscript @
// http://www.robertpenner.com/easing_equations.as
// use of which are subject to the license @
// http://www.robertpenner.com/easing_terms_of_use.html
function easeInQuad ($t, $b, $c, $d) {
$t/=$d;
return $c*$t*$t + $b;
};
function easeOutQuad ($t, $b, $c, $d) {
$t/=$d;
return -$c *($t)*($t-2) + $b;
};
// basic actionscript control of playback using mouse
$strAction="
if(!init){
init=true;
stopped=false;
controls = {
onMouseDown: function () {
if(!stopped){
stop();
stopped=true;
}else{
play();
stopped=false;
}
}
};
Mouse.addListener(controls);
}
";
$movie->add(new SWFAction($strAction));