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 // Install by copying to Fireworks/Configuration/Commands/ // Aaron Beall - http://abeall.com // Inspired by John Dunning(http://johndunning.com/) Object commands var dom = fw.getDocumentDOM(); // document object var sel = new Array().concat(fw.selection); // saved selection function SelectPointsBySide(side) { if(!sel.length) return false; var selPaths = []; //find all selected paths for(var s in sel){ if(String(sel[s]) == '[object Path]') selPaths.push(sel[s]); } if(!selPaths.length) return false; //user input if(!side){ var error = null; do{ if(error) alert(error); side = prompt('Choose Side:\n[L]eft, [R]ight, [T]op, [B]ottom', (fw.SelectPointsBySide_side || 'L')); if(side == null) return false; error = checkInput(side); //error = null; }while(error); function checkInput(str){ str = str.toUpperCase(); str = str.split('[').join('').split(']').join('').split(' ').join(''); if(str != 'R' && str != 'L' && str != 'T' && str != 'B') return 'Invalid input.'; return null; } } side = side.toUpperCase(); fw.SelectPointsBySide_side = side; //core algorithm to select points in "left","right","bottom",or "top" regions var i = selPaths.length; while(i--){ var p = selPaths[i]; //create bounding box of where points have to be to be considered "left","right",etc var selectIn = {left:null, right:null, top:null, bottom:null}; switch(side){ case 'L': selectIn = {left:p.left, right:p.left + (p.width / 2), top:p.top, bottom:p.top + p.height}; break; case 'R': selectIn = {left:p.left + p.width / 2, right:p.left + p.width, top:p.top, bottom:p.top + p.height}; break; case 'T': selectIn = {left:p.left, right:p.left + p.width, top:p.top, bottom:p.top + p.height / 2}; break; case 'B': selectIn = {left:p.left, right:p.left + p.width, top:p.top + p.height / 2, bottom:p.top + p.height}; break; } //find points in bounding box of region for(var cont in p.contours){ for(var node in p.contours[cont].nodes){ var n = p.contours[cont].nodes[node]; n.isSelectedPoint = (side == 'L' || side == 'R') ? (n.x <= selectIn.right && n.x >= selectIn.left) : (n.y <= selectIn.bottom && n.y >= selectIn.top); } } } if(fw.activeTool != 'Subselection') fw.activeTool = 'Subselection'; return true; } SelectPointsBySide();