JSFL :: printLinkageIDs
Submitted by hasan on Thu, 01/25/2007 - 08:00.
If you ever find yourself prepping 100s of assets for some Flash/Flex skinning, this command will peruse the Library and print out all the linkage IDs you so carefully crafted to a text file that you can later use to import or copy/paste into your styling scheme...
/*
* JSFL printLinkageIDs
* Author: Hasan Otuome
* hasan.otuome.com
* Version: 1.0
* January 21, 2007
*/
fl.outputPanel.clear();
//declare some variables
var doc = fl.getDocumentDOM();
var lib = doc.library;
//library variables
var clips = lib.items;
var clip;
var filename = new Array();
//get info about images in library
for(i=0; i<clips .length; i++){
clip = clips[i];
if(clip.itemType == "movie clip"){
filename.push(clip.linkageIdentifier);
}
}
filename.reverse();
for(j=0; j<filename.length; j++){
fl.trace(filename[j]);
}
//save output panel data to text file
//fl.outputPanel.save("file:///c|/[some directory/linkageIDs.txt"); WINDOWS
fl.outputPanel.save("file:///Macintosh HD:/Users/[your username here]/Desktop/linkageIDs.txt");Download a ZIP of this command here.


