setDimension(550,400); $movie->setRate(31); // useful for debugging $movie->setBackground(rand(0,0xFF),rand(0,0xFF),rand(0,0xFF)); // create a list of four mp3 files $mp3files=array("1.mp3","2.mp3","3.mp3","4.mp3"); // loop thru them for($i=0;$istreamMp3(fopen( $mp3files[$i],"rb")); // move along the timeline for the required number of frames while($numofframes-->0){ $movie->nextFrame(); } } // save swf with same name as filename $filename = basename(__FILE__,".php"); // save the .swf with the same name as the .php file // save and output return movie size in bytes... echo round($movie->save("$filename.swf",9)/1024)." Kb"; ?>