Joint Style from lineStyle() using LineTo()
Hi,
I am trying to create a simple drawing app. I am using Flash 9.0 with ACtion Script 3 inside the CS3 environment. Here is my code snippet that I am having a problem with:
var childLine:Shape=new Shape;
childLine.graphics.beginFill(cp.selectedColor,1*(s lider_val/num_alpha_intervals));
childLine.graphics.lineStyle((halfSize*2)+2,cp.sel ectedColor,1*(slider_val/num_alpha_intervals),
false,LineScaleMode.VERTICAL,CapsStyle.ROUND, JointStyle.ROUND);
childLine.graphics.moveTo(x_origin,y_origin);
childLine.graphics.lineTo(x_new_origin+(halfSize), y_new_origin+(halfSize));
childLine.graphics.endFill();
addChild(childLine);
Here is the output of the Flash Movie:
http://jamesm.pickspal.com/flash1_example.png
The alpha value of the line being drawn here is set to about 0.50.
So the problem appears to be the joints on the beginning and end of each new line are doubling up. By that I mean the starting joint of the new line seems to be overlayed on the end joint of the previous line.
I wan to use JointStyle = ROUND becuase it creates the smooth transition I want from one line to the next. I have tried various setting for the JointStyle in conjunction with the CapStyle, but non seem to prevent the joint from each line from doubling up.
Should I use a different technique altogether to accomplish a line drawing app. Would the Pen object be a better choice for this app?
Thanks very much