Strict Standards: Only variables should be passed by reference in /home/abeall/public_html/fireworks/download.php on line 28

Warning: Cannot modify header information - headers already sent by (output started at /home/abeall/public_html/fireworks/download.php:28) in /home/abeall/public_html/fireworks/download.php on line 44
// Fireworks JavaScript Command // Copy to Fireworks/Configuration/Commands/ // Aaron Beall - http://abeall.com var dom = fw.getDocumentDOM(); // document object var sel = new Array().concat(fw.selection); // saved selection function TrimPaths() { if (!sel.length) return false; var origPaths = []; dom.ungroup(); sel = new Array().concat(fw.selection); for (s in sel) { if (sel[s] == '[object Path]' ) { origPaths.push(sel[s]); } } if (origPaths.length < 2) return false; fw.selection = origPaths; var newPaths = []; // punch each path using the union of all other paths var i = fw.selection.length; while (i--) { fw.selection = origPaths; var paths = []; var n = i+1; while(n--) paths.push(fw.selection[n]); fw.selection = paths; dom.cloneSelection(); if(fw.selection.length>1){ var targetPath = fw.selection[i]; var unionPath = []; var n = i; while(n--) unionPath.push(fw.selection[n]); fw.selection = unionPath; dom.pathUnion(); dom.arrange('front'); fw.selection = [targetPath,fw.selection[0]]; dom.pathPunch(); } if(fw.selection.length) newPaths.push(fw.selection[0]); } // cleanup fw.selection = origPaths; dom.deleteSelection(false); fw.selection = newPaths; //dom.arrange('front'); return true; } TrimPaths();