Created
February 21, 2012 16:56
-
-
Save mach3/1877357 to your computer and use it in GitHub Desktop.
JavaScript for Fireworks CS5 to move selected items to new layers created with those names.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* JavaScript for Fireworks CS5 | |
* Move selected items to new layers created with those names. | |
*/ | |
(function(){ | |
var sel, dom, debug, i; | |
sel = fw.selection; | |
dom = fw.getDocumentDOM(); | |
debug = []; | |
for(i=0;i<sel.length;i++){ | |
(function(ele){ | |
fw.selection = ele; | |
dom.addNewLayer(ele.name, false); | |
dom.clipCut(); | |
dom.clipPaste(); | |
debug.push(ele.name); | |
})(sel[i]); | |
} | |
alert( debug.length + " items have been moved to new layers" ); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment