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();
}
 

Leave a Reply

Your email address will not be published.

You may 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="" highlight="">

Spam Protection by WP-SpamFree