2

Is there is a JSFL script to compile all opened fla in the Flash IDE?

grapefrukt
  • 27,016
  • 6
  • 49
  • 73
particle
  • 131
  • 5
  • 13

2 Answers2

5

This snippet will compile all open files according to their export settings:

function export_all(){ 
    var docs=fl.documents;
    var docs_length=docs.length;
    for (var i=0; i<docs_length; i++) {  
        var doc=docs[i];
        doc.publish();
    }
}
export_all();

Source: http://www.agileflash.com/2010/04/publish-all-opened-fla-files-using-jsfl/

grapefrukt
  • 27,016
  • 6
  • 49
  • 73
  • i posted your comment as a proper answer so it's clearer to people coming here later, it's marked as community wiki so I won't get any rep from you accepting it, since you did all the work ;) – grapefrukt Dec 21 '10 at 12:37
1

The JSFL you found is the most straightforward way, but also remember that you can publish all FLAs in a project file right from the project window (Window -> Other Panels -> Project in Win/CS5), without having to have each file open.

mpdonadio
  • 2,891
  • 3
  • 35
  • 54
  • In short I need to publish only opened fla. In project all selected flas is published. If I need to publish entire project flas, this method is useful. – particle Dec 22 '10 at 18:00
  • One other tip related to this. We sometimes use scenes to keep things in a single file, but test each scene separately to get individual swfs for each scene. It's fairly easy to modify what you have below to loop through each open doc, and then test each scene in the doc. – mpdonadio Dec 23 '10 at 02:04