4 Dec 2003

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.

The big change here is that the build process no longer needs to shut down the Flash IDE for batch compiles. This should come as both an added safety feature and a very nice workflow enhancement for development builds.

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.

Add Your Comment

Spam Protection by WP-SpamFree

Introducing Flash Ant and Flash Ant Lite

  1. I downloaded the FlashAnt and tried it. I have a few questions:

    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

    RC
  2. Aral – is FlashAnt still an active project? are you intending to support Flash8, or do you have a recommendation for a similar tool for this newer environment?

    Clay
  3. Have same question as Clay. Is it still a live project or is there anything similar.
    Have tried to get flash ant lite to work with eclipse -> with no succes. Know if anyone has a good setup doc? Don’t want to use MTSAC.

    Best regards
    // Bäcker

    Bäcker
  4. Sadly, this link is no longer available. Is there another place to view it or an updated version?

    http://www.markme.com/ethan/archives/003883.cfm

    Hugh
  5. If you want to hear a reader’s feedback :) , I rate this article for four from five. Decent info, but I just have to go to that damn msn to find the missed bits. Thank you, anyway!

    Heartburn Home Remedy