Copy link to clipboard
Copied
I'm looking for a script where you select items on the stage > Run a command script and Flash moves those items to a folder in the library, existing or new folder that is.
If anyone knows of such a script or a way to do it in Flash CC please let me know as that would be super useful.
Cheers
Frank
you can also use jsfl:
var doc = fl.getDocumentDOM();
var library = doc.library;
var selectAll = doc.selectAll();
var selectA = doc.selection;
for(var i=0;i<selectA.length;i++){
if(selectA.libraryItem){
moveToF('folder1',selectA.libraryItem.name);
}
}
function moveToF(folder,item){
if(!library.itemExists(folder)){
library.newFolder(folder);
}
library.moveToFolder(folder,item);
}
Copy link to clipboard
Copied
Any symbol instance on the stage is already going to be in the library somewhere. So you want a script for reorganizing the library? Why would these symbols not have been created in the correct folder to begin with?
Copy link to clipboard
Copied
Thanks for the reply Clay! really appreciate it
to Answer your Question:
Sadly because I'm not that organized when making them and things just get created in the root when I'm working quickly on animation or a scene, then I have to go moving things one by one
Copy link to clipboard
Copied
Errr... why one by one? Animate supports standard ctrl and shift multi-selecting in the library perfectly well.
Copy link to clipboard
Copied
I marked kglad's answer as being Correct, but you should be careful about how things are named, especially with HTML5 Canvas projects. With AS3 you can get away with library items being named the same thing, if they are in different folders. You can with Canvas too, but when you publish you'll find that same named items will only show up as one of them. So, make sure that every bitmap, sound, or symbol, has a unique name, even if they're organized into folders.
Copy link to clipboard
Copied
I really hope this guy hasn't just been empowered to do something simple in a more complex, roundabout way.
Copy link to clipboard
Copied
you may be correct. anything that requires selection on stage is going to be time-consuming for anything complex enough to justify using jsfl.
the script i posted selects everything on the main timeline. the following would allow the user to select items and then run the script, but using that does seem of limited value:
var doc = fl.getDocumentDOM();
var library = doc.library;
//var selectAll = doc.selectAll();
var selectA = doc.selection;
for(var i=0;i<selectA.length;i++){
if(selectA.libraryItem){
moveToF('folder1',selectA.libraryItem.name);
}
}
function moveToF(folder,item){
if(!library.itemExists(folder)){
library.newFolder(folder);
}
library.moveToFolder(folder,item);
}
Copy link to clipboard
Copied
you can also use jsfl:
var doc = fl.getDocumentDOM();
var library = doc.library;
var selectAll = doc.selectAll();
var selectA = doc.selection;
for(var i=0;i<selectA.length;i++){
if(selectA.libraryItem){
moveToF('folder1',selectA.libraryItem.name);
}
}
function moveToF(folder,item){
if(!library.itemExists(folder)){
library.newFolder(folder);
}
library.moveToFolder(folder,item);
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now