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 // Flattens each selected element to its own Bitmap -- useful for converting a bunch of source graphics to flattened versions for deployment // Install by copying to Fireworks/Configuration/Commands/ // Aaron Beall - http://abeall.com // Version 1.1 var dom = fw.getDocumentDOM(); // document object var sel = [].concat(fw.selection); // saved selection function FlattenElements() { // validate selection if(!fw.selection.length) return alert("Unable to flatten; no elements selected. Select multiple elements to flatten each to its own Bitmap."); // command script: var newSel = []; var s = sel.length; while(s--){ fw.selection = [sel[s]]; var name = sel[s].name; dom.flattenSelection(); if(name) fw.selection[0].name = name + " (Flattened)"; newSel.push(fw.selection[0]); } fw.selection = newSel; // command successful return true; } FlattenElements();