Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subtract a dynamic shape from another

Status
Not open for further replies.

gameon

Programmer
Feb 23, 2001
325
GB
Hi, I have a dynamic shape made from filling the space inbetween some lines. I really need it to be possible to be able to then substract that shpa efrom a square that I have on the stage. (which can be there already or drawn dynamically too...

Can this be done?

M@?
 
If your shape is a movieclip you should be able to use it as a mask over the square, hard to say exactly how to approach this without seeing the image though.
 
Hi Wangbar - I just got an email from flash kit:

this.beginFill(0xff0000, 100);

// draw a square (clockwise)
this.moveTo(0, 0);
this.lineTo(200, 0);
this.lineTo(200, 200);
this.lineTo(0, 200);
this.lineTo(0, 0);

// cut out a triangle in the square (draw a triangle counter-clockwise)
this.moveTo(100, 50);
this.lineTo(50, 150);
this.lineTo(150, 150);
this.lineTo(100, 50);

this.endFill();

Cheers for you help - cheers lots, m@)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top