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 // Version 1.0 var dom = fw.getDocumentDOM(); // document object var sel = new Array().concat(fw.selection); // saved selection function ExcludePaths() { if (!sel.length) return false; var origPaths = []; dom.ungroup(); for (s in sel) if (sel[s] == '[object Path]' ) origPaths.push(sel[s]); if (origPaths.length < 2) return false; fw.selection = origPaths; var newPaths = []; // temp layer is used to better control split actions var oldLayerNum = dom.currentLayerNum; dom.addNewLayer(null, false); var tempLayerNum = dom.currentLayerNum; dom.currentLayerNum = oldLayerNum; if(fw.selection.length == 0) return alert("There was a problem with your selection. NOTE: Exclude Paths does not work in Single Layer Editing mode."); dom.moveSelectionToLayer(oldLayerNum, false, 'none', -1); // move all paths to same layer to prevent errors // punch each path using the union of all other paths var i = fw.selection.length; while (i--) { fw.selection = origPaths; dom.cloneSelection(); arrangeSelectedElement(i, 'back'); var punch = []; for (var n = 0; n < fw.selection.length; n++) { if (fw.selection[n].customData.arrangeID != fw.lastArrangedElement) punch.push(fw.selection[n]); } fw.selection = punch; dom.pathUnion(); var union = fw.selection[0]; dom.selectAllOnLayer(dom.currentLayerNum, false, false); for (var n = 0; n < fw.selection.length; n++) { if (fw.selection[n].customData.arrangeID == fw.lastArrangedElement) { fw.selection = [fw.selection[n], union]; break; } } dom.pathPunch(); if(!fw.selection.length) continue; if(fw.selection[0].contours.length > 1) { dom.moveSelectionToLayer(tempLayerNum, false, 'none', -1); dom.currentLayerNum = tempLayerNum; dom.splitPaths(); dom.selectAllOnLayer(tempLayerNum, false, false); dom.moveSelectionToLayer(oldLayerNum, false, 'none', -1); dom.currentLayerNum = oldLayerNum; newPaths = newPaths.concat(fw.selection); }else{ newPaths.push(fw.selection[0]); } } // cleanup dom.deleteLayer(tempLayerNum); fw.selection = origPaths; dom.deleteSelection(false); fw.selection = newPaths; dom.arrange('front'); return true; } ExcludePaths(); // send selected element to specified arrangement function arrangeSelectedElement(index, to) { var origSelection = new Array().concat(fw.selection); fw.selection = [fw.selection[index]]; dom.arrange(to); fw.selection[0].customData.arrangeID = fw.lastArrangedElement = Math.random() * 1000000; origSelection[index] = fw.selection[0]; fw.selection = origSelection; }