setDimension(550,600); $movie->setBackground(rand(0,0xFF),rand(0,0xFF),rand(0,0xFF)); $movie->setRate(31); // get as from external file(s) $strAction = join("", file("com/output_textbox.as")); // 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); ?> /* ##############output_textbox.as contents################## _root.createEmptyMovieClip('output', ++depth); _root.output.createTextField('output', ++depth,350,50,100,100); myformat = new TextFormat(); myformat.color = 0x000000; myformat.font = 'Arial'; myformat.size = 12; with (_root.output.output){ multiline = true; wordWrap = true; border=true; selectable=false; text='Hello World'; setTextFormat(myformat); } _root.output.onEnterFrame=function(){_root.output.output.text=++aa;}; _root.output.onPress=function(){startDrag("");}; _root.output.onRelease=function(){stopDrag();}; _root.output.onReleaseOutside=function(){stopDrag();}; */