Location: PHPKode > scripts > LampoWeb > lampoweb/lampoweb.php
<?
/*
	Simple test page for php-ming

	uncomment the functions to play

*/
require "lampoweb.inc";


    $colors['up'] = $colorList['SkyBlue3'];
    $colors['hit'] = $colorList['SkyBlue1'];
    $colors['over'] = $colorList['SkyBlue1'];
    $colors['text'] = $colorList['White'];
	$colors['down'] = $colorList['Firebrick3'];
	$colors['fill1'] = $colorList['Firebrick3'];
	$colors['fill2'] = $colorList['White'];
	$colors['background'] = $colorList['Lavender'];

	$xMax = 800;
	$yMax = 600;
	$frames = 200;
	$cp = new point($xMax/2,$yMax/2);
	$ul = new point(0,0);
	$lr = new point($xMax,$yMax);
	$ur = new point ($lr->x , $ul->y);
	$ll = new point ($ul->x , $lr->y);


	//var_dump ($colors);
	ming_setcubicthreshold(10);

	$myShape=new SWFShape();
	$myShape->setLine(0,0,0,0);
	$myFill =$myShape->addFill($colors['fill1']->getDecR(), $colors['fill1']->getDecG(), $colors['fill1']->getDecB());
	$myShape->setRightFill($myFill);


	$myMovie=new SWFMovie();
	$myMovie->setDimension($xMax,$yMax);
	$myMovie->setBackground($colors['background']->getDecR(), $colors['background']->getDecG(), $colors['background']->getDecB()); // light blue


	$myShape2=new SWFShape();
	$myShape2->setLine(0,0,0,0);
	$myFill2 =$myShape2->addFill($colors['hit']->getDecR(), $colors['hit']->getDecG(), $colors['hit']->getDecB());
	$myShape2->setRightFill($myFill2);
	vecLoad ('spirale.vec' , &$myShape2 , 1 , $xMax * 0.6);
	$lampoweb = ShapeRotateAt(&$myShape2, &$myMovie, $cp , -360 , $frames*2);
	$lampoweb->setName('spirale');

	//ShapeAnimateFromToRot(&$myShape, &$myMovie, $cp , $ul , -360 , $frames);
	//ShapeAnimateFromToRot(&$myShape, &$myMovie, $cp , $ur , +360 , $frames);
	//ShapeAnimateFromToRot(&$myShape, &$myMovie, $cp , $ll , +360 , $frames);
	//ShapeAnimateFromToRot(&$myShape, &$myMovie, $cp , $lr , -360 , $frames);
	//ShapeRotateAt(&$myShape, &$myMovie, $cp , 360 , $frames);


	$mySprite= new SWFSprite();
	vecLoad ('lampoweb.vec' , &$myShape , 1 , $xMax * 0.8);

	//for($n=0; $n<9; ++$n)
	//{
		for($i=0; $i<9; ++$i)
		{
			$infunc = $infuncs[$i];
			$instance = $infunc($mySprite, $myShape , $cp);

			for($j=0; $j<30; ++$j)
				$mySprite->nextFrame();

			$outfunc = $outfuncs[$i];
			$outfunc($mySprite, $myShape, $instance, $cp );
		}
	//}

	$lmp = $myMovie->add($mySprite);
	$lmp->setName('lampoweb');



	$dimension = new point(700,20);
	$point = new point(50,500);

	$menu[]= array( 'text' => 'Browse Itopen.net' , 'action' => "getUrl('http://www.itopen.net', '_top');");
	$menu[]= array( 'text' => 'View Acqualba.it' , 'action' => "getUrl('http://www.acqualba.it', '_top');");
	$menu[]= array( 'text' => 'Stop' , 'action' => "spirale.stop();lampoweb.stop();");
	$menu[]= array( 'text' => 'Start' , 'action' => "
							spirale.play();
							lampoweb.play();
							lampoweb._visible = true;

						");
	$menu[]= array( 'text' => 'Clear' , 'action' => "lampoweb._visible = false;");

        putSWFHorizontalMenu ($myMovie , $dimension , $point , 0.1 , $menu , "Techno.fdb" ,
	           $colors, 'center', 1);



	//header("Content-type: application/x-shockwave-flash");
	$myMovie->save('lampoweb.swf');

	$bg = $colors['background']->getColor();
	$top = <<< XXX
		<html>
		<head>
		</head>
		<body bgcolor="#$bg">
			<center>
				<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" ID=objects WIDTH=$xMax HEIGHT=$yMax>
				<PARAM NAME=movie VALUE="lampoweb.swf">
				<EMBED src="lampoweb.swf" WIDTH=$xMax HEIGHT=$yMax TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
			</OBJECT>
			</center>
		</body>
		</html>
XXX;
	echo $top;

?>
Return current item: LampoWeb