Publish all open documents in Flash
Published by admin May 25th, 2007 in Flash PlatformIt'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:
-
var num = fl.documents.length ;
-
for ( var k = 0 ; k <num ; k++ ) {
-
fl.documents [ k ].publish ( ) ;
-
}
-
-
fl.outputPanel.clear();
-
fl.trace( "all your documents have been published" ) ;
With a little applescript compiled down to an Application you can launch your jsfl:
JAVASCRIPT:
-
tell application "Finder"
-
activate
-
open document file "Publish_all_open_docs.jsfl" of folder "Path to your folder" of startup disk
-
end tell
And with a little XML in your Ant Build you can kick the whole lot off from Eclipse:
XML:
-
<target name="Compile all open Fla's in Flash IDE" description="Compile all open Fla's in Flash IDE">
-
<exec executable="path/to/you/compiled/applescript/compile_all_in_flash.app" />
-
</target>
Enjoy ![]()
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,
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
Oh man,
this is exactly what I’ve been looking for…
Thanks,