setDimension(600,400); $movie->setBackground(rand(0,0xFF),rand(0,0xFF),rand(0,0xFF)); $movie->setRate(31); $strAction = " // load and play mp3 file s = new Sound(); function callback() { s.start(); } // Electrow-Partners-60_hifi.mp3 from flashkit soundfx s.loadSound( 'Electrow-Partners-60_hifi.dat', true); s.onSoundComplete = callback; s.start(); // some visual thing _root.createEmptyMovieClip('line', 1); with (line) { lineStyle(2, 0x000066, 40); moveTo(0, 0); lineTo(0, -100); lineTo(0, 100); endFill(); }; line._x=275; line._y=200; line.onEnterFrame=function(){ this._rotation+=15; }; "; $movie->add(new SWFAction( $strAction)); // save swf with same name as filename $swfname = basename(__FILE__,".php"); $movie->save("$swfname.swf",9); ?>