This content has been marked as final. Show 3 replies
create a class that extends the shape class and define drawSquareLine to be a public function of that class. then create shpe to be an instance of your class and apply drawSquareLine to it.
p.s. don't you want to use brushWidth instead of .25 and you might want to use endFill().
you explained that perfectly (and it still took me 40 mins to figure it out).
So in the external class .as file I have
public class lineTool extends Shape
public function drawSquareLine(x1:int,y1:int,x2:int,y2:int,color:uint,brushSize:int)
var bsH:Number = brushSize/2;
//many more lineTo's etc
and in frame 1 of my movie I have
var shpe:lineTool = new lineTool();
Thanks for the help mate :)