# Punch holes in a sprite?

**URL:** <https://forum.kirupa.com/t/punch-holes-in-a-sprite/254714>\
**Category:** Uncategorized\
**Created:** [March 14, 2008, 3:38pm UTC](https://forum.kirupa.com/t/punch-holes-in-a-sprite/254714 "2008-03-14T15:38:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![monk\_e\_boy](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@monk\_e\_boy](https://forum.kirupa.com/u/monk_e_boy)\
**Post date:** [March 14, 2008, 3:38pm UTC](https://forum.kirupa.com/t/punch-holes-in-a-sprite/254714/1 "2008-03-14T15:38:29Z")

</div>

Hi,

I would like to punch holes in a sprite, maybe using a mask?

[http://teethgrinder.co.uk/open-flash-chart/gallery-data.php](http://teethgrinder.co.uk/open-flash-chart/gallery-data.php)

I write the above code, if you take a look at the hollow dots, at the moment these are built as:

sprite with a line -\> this has many children sprites that are the hollow dots (these have on click events etc.)

I fill the hollow dot with the background colour, but what I’d like to do is punch a hole through the parent sprite (the line) so the background would show through.

I’d like to do something similar for the solid dots - see the tiny halo each has? Can I somehow use the same ‘punch out’ to erase part of the parent sprite?

Any ideas?

Is there a way of doing:

set fill style to ‘cut out’  
line\_sprite.graphics.drawCircle( 10, 10, 10 );

then this would cut a bit out of the line? I tried setting the alpha to zero - but this won’t draw anything ☹

Thanks for any help 🙂

monk.e.boy
