There’s been a lot of posts about command line Flash compilers lately. Just wanted to share a quick and dirty solution I developed, using… DOS batch files!
Here is the batch file:
@echo off echo // > tempPublish.jsfl :start echo %1 echo filename = "file:///%1"; >> tempPublish.jsfl echo fl.openDocument(filename); >> tempPublish.jsfl echo curr_doc = fl.getDocumentDOM(); >> tempPublish.jsfl echo curr_doc.publish(); >> tempPublish.jsfl echo curr_doc.close(false); >> tempPublish.jsfl shift if "%1" == "" goto end goto start :end echo fl.quit(true); >> tempPublish.jsfl start "C:/Program Files/Macromedia/Flash MX 2004/Flash.exe" tempPublish.jsfl
just save that in a text file as “flashpublish.bat” or whatever, and use like so:
flashpublish myfile1.fla myfile2.fla pathto/subdir/myfile3.fla