The following example shows how you can use JSFL to loop over each open document in the Flash Authoring IDE using the fl.documents array.

Full code after the jump.

// JSFL
fl.outputPanel.clear();
var docs = fl.documents;
if (docs.length > 0) {
    for (var i=0; i<docs.length; i++) {
        var doc = docs[i];
        fl.trace(doc.name + ": ActionScript " + doc.asVersion.toString());
    }
} else {
    fl.trace("No Flash documents currently open.");
}
 

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