1 Reply Latest reply on Aug 8, 2007 4:54 PM by Marcus_House

    begin Fill merge with another fill

    Marcus_House
      Hi all.
      Got a problem.

      In the below example (if you paste into a new fla with AS3) you will see that the two squares sit on top of each other. This is not what I want for a few reasons. I am makeing a brush type tool that needs to update the shape every time the mouse moves etc.
      Is there a way I can make the fill merge with the last fill rather than sitting on top like a layer. (Surely there must be a way)
      If not can you suggest a way I can do somehting similar. It is not possible to redraw every fill every time as it would slow down very quickly.
      I goal is to have the user use a square brush. (If a round brush I would simply use the lineTo to do it quite easily)

      var shapeClip:Shape=new Shape();
      addChild(shapeClip);
      with(shapeClip)
      {
      graphics.lineStyle(.25,0x000000,0);
      graphics.beginFill(0xFF0000,.5);
      graphics.moveTo(10,10);
      graphics.lineTo(50,10);
      graphics.lineTo(50,50);
      graphics.lineTo(10,50);
      graphics.lineTo(10,10);
      graphics.endFill();

      graphics.beginFill(0xFF0000,.5);
      graphics.moveTo(30,30);
      graphics.lineTo(70,30);
      graphics.lineTo(70,70);
      graphics.lineTo(30,70);
      graphics.lineTo(30,30);
      graphics.endFill();
      }