Skip to main content
Participant
June 15, 2017
Answered

Stage Select - Library organize

  • June 15, 2017
  • 2 replies
  • 469 views

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

This topic has been closed for replies.
Correct answer kglad

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

}

2 replies

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
June 15, 2017

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

}

Legend
June 15, 2017

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?

Frank9Author
Participant
June 15, 2017

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

Legend
June 15, 2017

Errr... why one by one? Animate supports standard ctrl and shift multi-selecting in the library perfectly well.