setDimension(550,600); $movie->setBackground(rand(0,0xFF),rand(0,0xFF),rand(0,0xFF)); $movie->setRate(31); // here is a php variable that will be used in the actionscript // it could be from a querystring but its not :) $someVariable="all your bases are belong to us..."; // write AS $strAction = " _root.createTextField('output', 20,10,10,500,300); _root.output.multiline = true; _root.output.wordWrap = true; _root.output.border=true; _root.output.selectable=false; _root.output.setTextFormat(myformat); myformat = new TextFormat(); myformat.color = 0x000FF0; myformat.bold = true; myformat.font = '_sans'; myformat.size = 36; _root.output.text=\"$someVariable\"; _root.output.setTextFormat(_root.myformat); "; // add actionscript to movie $movie->add(new SWFAction($strAction)); // save swf with same name as filename $swfname = basename(__FILE__,".php"); $movie->save("$swfname.swf",9); ?>