3 Replies Latest reply on Aug 8, 2007 7:13 AM by kglad

    How do you make your own AS3 custom methods?

    Marcus_House Level 1
      I was wondering If I could make my own method for shape.
      I have written a little function to draw a line using a square brush from one point to another point.

      Now at the moment this is just a function as follows
      function drawSquareLine(shpe:Shape,x1,y1,x2,y2,brushWidth,color){

      However I thought it would be cool if I could make it like a custom method (is that the right terminilogy?)
      So instead of supplying the shape as a param of the function.. could I make it be called like this?


      And if so could I have an example on how I would do this?

      cheers guys.