Skip to content

Instantly share code, notes, and snippets.

@cellfusion
Created November 9, 2011 09:20
Show Gist options
  • Save cellfusion/1350941 to your computer and use it in GitHub Desktop.
Save cellfusion/1350941 to your computer and use it in GitHub Desktop.
duplicate MovieClip JSFL
num = 48
path = fl.getDocumentDOM().library.getItemProperty("name");
path_array = path.split("/");
name = path_array[path_array.length - 1];
linkageBaseClass = fl.getDocumentDOM().library.getItemProperty("linkageBaseClass");
linkageExportForAS = fl.getDocumentDOM().library.getItemProperty("linkageExportForAS");
linkageExportInFirstFrame = fl.getDocumentDOM().library.getItemProperty("linkageExportInFirstFrame");
for (i = 1; i < num; i++) {
fl.getDocumentDOM().library.duplicateItem(path);
}
var items = fl.getDocumentDOM().library.getSelectedItems();
for (i = 0; i < items.length; i++) {
items[i].name = name+(i+2);
items[i].linkageExportForAS = linkageExportForAS;
items[i].linkageExportInFirstFrame = linkageExportInFirstFrame;
items[i].linkageBaseClass = linkageBaseClass;
}
fl.getDocumentDOM().library.selectNone();
@cellfusion
Copy link
Author

選択してる MovieClip の基本クラスとかそのまま複製できる JSFL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment