jsfl
Autobuilds…rollout!
Wednesday, April 22nd, 2009 | Keith Morgan's Blog, teh internets | No Comments
The art of auto building flash is a lost art. Recently, I had to publish 19 Flash CS4 video players quickly and we weren’t prepared to port anything over to Flex. I was pretty much screwed.
..so what the !#@$ is that supposed to mean?
After about 4 days of manual builds. I’d had enough. I searched the interwebs for any signs of auto building Flash found out JSFL (JavaScriptFlash) for MX2004. Well..Apparently its still supported in CS4 and I was able to piece together a jsfl file from examples from the web:
Create a new text document named “publish.jsfl” and add the following:
fl.openDocument(“file:///<path-to>.fla”);
curr_doc = fl.getDocumentDOM();
curr_doc.publish();
curr_doc.close();
fl.quit(true);
Save and simply run, assuming you’re in the same directory as the publish.jsfl file.
C:/Program Files/Adobe/Adobe Flash CS4/Flash.exe publish.jsfl
Well, once the build process was down to a few exe commands, I created a batch file (win32) to execute the exe’s. But since we (and most people who have never used Windows before Win2000) use ant, I converted the build process:
<property name=”publish.jsfl” value=”publish.jsfl”/>
<property name=”flash” value=”C:/Program Files/Adobe/Adobe Flash CS4/Flash.exe”/>
<exec executable=”${flash}”>
<arg line=”‘${publish.jsfl}’” />
</exec>
Be warned. using multiple jsfl files will open/close the application and may cause corruption in the swf’s.
Find
Currently
There are no events to show at this time.