Is there a ActionScript-version of JavaScript's Canvas.clearRect()?
I only know graphics.drawRect(...) which allows me draw but not remove rectangles.
If there is no such method in ActionScript, how can I emulate it?
Is there a ActionScript-version of JavaScript's Canvas.clearRect()?
I only know graphics.drawRect(...) which allows me draw but not remove rectangles.
If there is no such method in ActionScript, how can I emulate it?
There is not an equivalent in ActionScript to clearRect. If you need to do that, then you may want to have multiple sprites, and draw to them separately. That would allow you to adjust z-order, and to remove sections.
If you need to cut out a section of a shape, then you can use drawPath.
mike