It's been a really long time since I used the IDE but a big project I'm working on at the moment calls for it. I wished that I could hit a button and compile all my open Fla's.

Thankfully I've been here before, with a little JSFL you can publish all the open documents:

JAVASCRIPT:
  1. var num = fl.documents.length ;
  2. for ( var k = 0 ; k <num ; k++ ) {
  3.     fl.documents [ k ].publish ( ) ;
  4. }
  5.  
  6. fl.outputPanel.clear();
  7. fl.trace( "all your documents have been published" ) ;

With a little applescript compiled down to an Application you can launch your jsfl:

JAVASCRIPT:
  1. tell application "Finder"
  2.     activate
  3.     open document file "Publish_all_open_docs.jsfl" of folder "Path to your folder" of startup disk
  4. end tell

And with a little XML in your Ant Build you can kick the whole lot off from Eclipse:

XML:
  1. <target name="Compile all open Fla's in Flash IDE" description="Compile all open Fla's in Flash IDE">
  2.         <exec executable="path/to/you/compiled/applescript/compile_all_in_flash.app" />  
  3.     </target>

Enjoy :-D

Socialise this post, find out more about the Socializer plugin for WordPress.

3 Responses to “Publish all open documents in Flash”  

  1. 1 Daniel Tome

    This is quite neat. I use something similar and after the publish I do an open of my main:

    fl.openScript(path + “Deploy/ApplicationMain.swf”);

    And I’ve assigned the key to: CTRL + ] (it’s quite close to the enter key)
    I’m trying to move away from the IDE, but for managing assets I still find it very difficult to use anything else.

    cheers,

  2. 2 admin

    Asset management and workflow in Flash is hard however you are developing IDE or not.

    Although, I have to say the Eclipse/FDT/MTASC/SWFmill method where your entire project is Fla-less, is much easier than the alternative. It’s not perfect, but it’s better especially when you have a large team working on a project.

    Jolyon

  3. 3 Ricky

    Oh man,

    this is exactly what I’ve been looking for…

    Thanks,

Leave a Reply