Saving and compacting all open documents in Flash using JSFL

by Peter deHaan on November 29, 2008

in JSFL

The following example shows how you can use JSFL to save and compact each of the currently open documents in the Flash Authoring IDE by looping over the fl.documents array and calling the saveAndCompact() method.

Full code after the jump.

// JSFL
for each (var doc in fl.documents) {
    fl.trace("Saving and compacting \"" + doc.name + "\"...");
    var success = doc.saveAndCompact();
}

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Previous post:

Next post: