setDimension(550,400); $movie->setBackground(rand(0,0xFF),rand(0,0xFF),rand(0,0xFF)); $movie->setRate(31); // move along a few frames for($i=0;$i<5;$i++){$movie->nextFrame();} // open the mp3 file $snd = fopen("boomb.mp3", "rb"); // add the mp3 to the movie $stream=$movie->streamMp3($snd); // close the mp3 file fclose($snd); // add enough frames to movie for stream to work for($i=0;$i<$stream;$i++){ $movie->nextFrame(); } // save swf with same name as filename $swfname = basename(__FILE__,".php"); $movie->save("$swfname.swf",9); ?>