Archive for March, 2008

Create Instance Name using MC Name in Library

Friday, March 21st, 2008

After wishing for years that Flash would automagically insert the name of a newly made MC as its instance, I finally grew antsy and make this little JSFL command:

if (fl.getDocumentDOM().selection.length > 0){

for(i in fl.getDocumentDOM().selection){

path = fl.getDocumentDOM().selection[i].libraryItem.name;
mc_name = path.substr(path.lastIndexOf(“/”)+1);
fl.trace(‘clip = ‘+mc_name);
fl.getDocumentDOM().selection[i].name = mc_name;

}

}