Automated Swf Publishing

Today i was faced with the pleasant task of publishing over 100 .fla’s into swfs. Not something i would ever do manually if i could avoid it.

Handily i remember reading this from grant skinner just the other day which is a great start, but im not going to hand write the compile schema (aka list of files to be published). In my case there arent any special deployment requirements, i can just stick the output files all in 1 directory. (Although if the jsfl file api thingy had a directory selector and a way to iterate through a directory contents then i wouldnt need any of this…)

Someone wrote a nice comment about using the dir command and a .bat file on windoze to generate the schema, handy but pretty dirty. So instead of that i knocked up a quick ruby script to generate a simple schema file, which is probably a good start if you need a more interesting layout, at least you dont have to write it all by hand.

It was also a good excuse to actually write some ruby code rather than just read about it. So here it is ‘my first ruby program’

enhancements and modifications are welcome.

the code is here