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 // Fireworks/Configuration/Commands/ // Aaron Beall // Version 1.1 /* TODO: - [DONE-v1.1] convert multiple selected sub-layers to groups */ var dom = fw.getDocumentDOM(); var sel = [].concat(fw.selection); var success = false; for(var s in sel){ var layerNum = getLayerNum(sel[s]) if(layerNum != -1){ var parentLayerNum = dom.getParentLayerNum(layerNum); if(parentLayerNum != -1){ var layerName = dom.layers[layerNum].name; var elems = dom.layers[parentLayerNum].frames[dom.currentFrameNum].elemsandsublayers; for(var e in elems){ if(elems[e] == '[object Layer]' && elems[e].name == layerName) break; } dom.selectAllOnLayer(layerNum, false, false); dom.group(); if(!(layerName.indexOf('Layer') == 0 && !isNaN(Number(layerName.substr(5)))) && !(layerName.indexOf('Group') == 0 && !isNaN(Number(layerName.substr(5)))) ) fw.selection[0].name = layerName; var oldLayerNum = layerNum; dom.moveSelectionToLayer(parentLayerNum, false, "none", Number(e)); dom.deleteLayer(oldLayerNum); success = true; } } } if(!success) alert("Unable to complete your request; no Sublayers selected."); function getLayerNum(elem){ for(var l in dom.layers) for(var e in dom.layers[l].frames[dom.currentFrameNum].elements) if(dom.layers[l].frames[dom.currentFrameNum].elements[e].customData == elem.customData) return Number(l); return -1; }