On 6/6/06, daniel fischer <[EMAIL PROTECTED]> wrote: > hey, > > > generate swfml to a text file (or pipe in) > > invoke swfmill > > somehow capture output to browser > > (use php to send the output directly?) > > you will have to do the full-screen stuff from JS. i dont have a sample, > but i know that php can pipe the output of a shell command to the client > directly, so if you first set the content-type header to swf, then run > swfmill without specifying an output.swf, it will print to stdout- > > if you find out how to feed swfmill's stdin while it's running, this > command: > "swfmill simple stdin stdout" > > will process stdin to stdout- possibly resulting in the most efficient > way to do what you want. > > php docs should enlighten you on the external command/pipe issues.
Unfortunately PHP has very poor support for pushing large amounts of data through stdin and stdout of a child process cross platform (with the Windows implementation behaving particularly badly). If you want to go down this road, have a look at the proc-open function (http://php.net/proc_open) It might actually be more robust to write the XML to a file, have swfmill generate a swf and then file_get_contents the resultant swf (before deleting it). Either way, you'll need to output the appropriate Content-type header like this: header("Content-type: application/x-shockwave-flash"); You might also want to output the Content-length header so that any preloaders you've got in place will work: header("Content-length: " . strlen($swfData)); Hope this helps! Steve -- Steve Webster http://dynamicflash.com _______________________________________________ swfmill mailing list [email protected] http://osflash.org/mailman/listinfo/swfmill_osflash.org
