In large project, it is not uncommon to have several swf files: for example, a preloader, a main animation holder, several sections…
And when several people work on the same project, each of the project developer may need to republish all the files at regular interval (for example when updating its source files, when using a source control system like subversion). The following DOS script publish all fla files of the folder in which it is executed:
@echo off echo // > tempPublish.jsfl :start for %%i in (*.fla) do ( echo filename = "file:///%%i"; >> 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) echo fl.quit(true); >> tempPublish.jsfl start "C:/Program Files/Adobe/Adobe Flash CS3/Flash.exe" tempPublish.jsfl
This script create a tempPublish.jsfl file, write in it jsfl publish command for each fla in the current folder, and then execute that jsfl script (jsfl is a scripting language that can be executed by Flash to perform publication-related tasks)
