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 2007 - http://abeall.com // Version 1.0 var dom = fw.getDocumentDOM(); var sel = [].concat(fw.selection); var nod, predAngle, succAngle, avgAngle, dif, dist, traj; for(var p in sel){ for(var c in sel[p].contours){ for(var n=0; n180) avgAngle += 180; // adjust successor handle to average dist = getDistance(nod,{x:nod.succX,y:nod.succY}); traj = getTrajectory(dist,avgAngle); nod.succX = nod.x+traj.x; nod.succY = nod.y+traj.y; // adjust predecessor handle to average dist = getDistance(nod,{x:nod.predX,y:nod.predY}); traj = getTrajectory(dist,avgAngle+180); nod.predX = nod.x+traj.x; nod.predY = nod.y+traj.y; nod.isCurvePoint = true; } } } } // find the distance between two points function getDistance(p1,p2){ return Math.sqrt(((p1.x-p2.x)*(p1.x-p2.x))+((p1.y-p2.y)*(p1.y-p2.y))); } // get the angle in degrees between two points function getAngle(p1,p2){ return -Math.atan2((p1.x-p2.x), (p1.y-p2.y))/(Math.PI/180); } // given angle and distance, find x,y translation function getTrajectory(distance,angle){ var xS = distance*Math.sin(angle*(Math.PI/180)); var yS = -distance*Math.cos(angle*(Math.PI/180)); return {x:xS,y:yS}; }