# Non rectangle buttons from PNG w/ transparency?

**URL:** <https://forum.kirupa.com/t/non-rectangle-buttons-from-png-w-transparency/207018>\
**Category:** flash\
**Created:** [November 14, 2006, 2:22am UTC](https://forum.kirupa.com/t/non-rectangle-buttons-from-png-w-transparency/207018 "2006-11-14T02:22:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eslacker](https://avatars.discourse-cdn.com/v4/letter/e/e56c9b/32.png) [@eslacker](https://forum.kirupa.com/u/eslacker)\
**Post date:** [November 14, 2006, 2:22am UTC](https://forum.kirupa.com/t/non-rectangle-buttons-from-png-w-transparency/207018/1 "2006-11-14T02:22:52Z")

</div>

I’d like to be able to create dynamic masks from PNG images by removing/ignoring the transparent pixels so that only the non-transparent parts of the image acts as the mask. A native shape can be any shape and used as a mask, so is there a way to get to that point from a PNG file?

I looked at some bitmapData stuff and you can isolate pixels and change their color, etc., so can you exclude them from the mask, or is there a way to convert (i.e. break apart) an image a runtime?

Any help/thoughts would be most appreciated. TIA!

Ciao,

-Jei.
