title: Change pixel color with ActionScript 3
body: <p>Say I have drawn a triangle with:</p>
  
  <pre><code>import flash.geom.Matrix;
  
  function drawTriangle(sideLength:uint):void {
      var triangleHeight:uint = Math.sqrt(Math.pow(sideLength,2) - Math.pow(sideLength / 2,2));
      var triangleShape:Shape = new Shape();
      triangleShape.graphics.beginFill(0x2147AB);
      triangleShape.graphics.lineStyle(1,0xff00ff00);
      triangleShape.graphics.moveTo(sideLength/2, 0);
      triangleShape.graphics.lineTo(sideLength, triangleHeight);
      triangleShape.graphics.lineTo(0, triangleHeight);
      triangleShape.graphics.lineTo(sideLength/2, 0);
      addChild(triangleShape);
  
      var matrix:Matrix = new Matrix;
      matrix.translate(50, 50);
      transform.matrix = matrix;
  }
  
  drawTriangle(400);
  </code></pre>
  
  <p><strong>How can I achieve the following:</strong></p>
  
  <p>When the user clicks a point inside the triangle, we will get the x and y coordinates, do some calculation with those values and get some (lots) of pixel coordiantes accordingly (all of those calculated points will be within the triangle). And finally, change the color of those points (something different than triangleShape fill color).</p>