Introducing Flash Ant and Flash Ant Lite
Welcome to the permanent new home of Flash Ant, an enhancement of the excellent Flash task for Apache Ant by Ethan Malasky.
Flash Ant is based on Mike Williams' and Ethan Malasky's Command-line Flash Compilation release for Central. That release contains everything you need to compile Flash apps with Ant, however newcomers to Ant might find it a little difficult to customize it for use with non-Central applications.
Starting with Ethan's excellent task, I have added and or changed the following things in this release:
- It is no longer necessary to quit the Flash IDE for batch publishes.
- Flash task now waits until the last SWF has published before attempting to copy the SWFs to output directory.
- Fixed issue with the Flash output panel being cleared each time and skewing the MX2004_ErrorOutput log results.
- Fixed timing issue with MX2004_ErrorOutput access sometimes trying to compete with Flash for the file lock, resulting in the following error: "The process cannot access the file because it is being used by another process."
- Fixed timing issue with Flash task sometimes competing with Flash for handle on last published SWF.
- Flash task now deletes the SWFs it creates in the source directories after copying them so as not to pollute them.
- All properties have been moved to antbuild.properties files. There is no longer any reason to edit the build.xml file.
- The Central-only FlashSecretDirname.java has been removed.
- Flash_Ant_Lite only: The source file compilation for the Flash task has been removed to speed up build time.
Note that the Flash task is backwards compatible and should work exactly as it did before if you would rather have Flash shut down after publishing the SWFs. More information is available in the README.txt file.
There are two packages being released: Flash Ant and Flash Ant Lite.Download the latest versions here.
Flash Ant contains all of sources and the build script compiles the Flash task each time (this is how Ethan's original Central release functioned.) Flash Ant Lite does not contain the sources but has the compiled Flash task. Also, the sample build file *does not* compile the Flash task every time (saving a few ms of your valuable time!) :)
The behaviors of the compile_single and compile_all targets in the build file have been slightly modified. Compile_single now compiles a single FLA whereas compile_all compiles all FLAs recursively.
Comments
1) Just wonder how come the SWF is not generate with "doc.publish(); \r\n" instead of "doc.exportSWF(\"" + toSWF + "\", true); \r\n") in the method , doFileOperations. All profiles should have the out file defined. I think, at least, it should be an option either users can choose different output files location or they can just use the output setting in the profile.
I modified the Java file to include "fl.getDocumentDOM().currentPublishProfile = \""+profilename+"\"; \r\n" before "doc.publish(); \r\n". So that, users can also configure the profile for publishing.
2) Why not set the swf destination in doc.exportSWF()in the output jsfl instead of copying the swf to the destination and deleting the original swf.
Thanks
RC
by RC on 2005-08-09 21:27:31
by Clay on 2006-05-18 15:33:22
by Bäcker on 2006-06-09 14:00:41
by Hugh on 2008-02-18 06:28:19
by Heartburn Home Remedy on 2009-04-15 13:00:54