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
var dom = fw.getDocumentDOM(); var sel = [].concat(fw.selection); function TileGrid(){ if(!dom) return; // validate selection if(!sel.length) return alert('Select one or more objects. This command will duplicate them in a tiled grid pattern.'); // user input var input; do{ input = prompt('Enter number of tiles, columns by rows:',fw.TileGrid_input||'3x3'); if(input == null) return; }while(!validateInput()); function validateInput(){ input = String(input).split('x'); if(input.length != 2){ if(input.length == 1 && !isNaN(Number(input[0]))) input.push(input[0]); else return alert('Invalid input!'); } input[0] = Number(input[0]); input[1] = Number(input[1]); if(isNaN(input[0]) || isNaN(input[1])) return alert('Invalid input!'); if(input[0] < 1 || input[1] < 1) return alert('Invalid input! Enter numbers equal to or greater than 1.'); if(input[0]%1 || input[1]%1) return alert('Invalid input! Enter integers only.'); return true; } fw.TileGrid_input = input.join('x'); // create tiles grid var wasGrouped = false; if(sel.length > 1 || !fw.selection[0].pixelRect){ dom.group(); sel = [].concat(fw.selection); wasGrouped = true; } var bounds = fw.selection[0].pixelRect; var finalSel = [].concat(sel); var i = input[0]-1; while(i--){ dom.cloneSelection(); dom.moveSelectionBy({x:bounds.right-bounds.left,y:0},false,false); finalSel = finalSel.concat(fw.selection); } fw.selection = finalSel; var i = input[1]-1; while(i--){ dom.cloneSelection(); dom.moveSelectionBy({x:0,y:bounds.bottom-bounds.top},false,false); finalSel = finalSel.concat(fw.selection); } fw.selection = finalSel; if(wasGrouped) dom.ungroup(); dom.group(); fw.selection[0].name = "Tile Grid: "+fw.TileGrid_input; } //try{ TileGrid(); //}catch(e){ alert([e, e.lineNumber, e.fileName].join("\n")) };