# BitmapData onto Irregular Shape

**URL:** <https://forum.kirupa.com/t/bitmapdata-onto-irregular-shape/246371>\
**Category:** flash\
**Created:** [December 10, 2007, 3:57pm UTC](https://forum.kirupa.com/t/bitmapdata-onto-irregular-shape/246371 "2007-12-10T15:57:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![khamstra](https://avatars.discourse-cdn.com/v4/letter/k/cdc98d/32.png) [@khamstra](https://forum.kirupa.com/u/khamstra)\
**Post date:** [December 10, 2007, 3:57pm UTC](https://forum.kirupa.com/t/bitmapdata-onto-irregular-shape/246371/1 "2007-12-10T15:57:56Z")

</div>

How can I attachBitmap to an irregular shape?

I load a pattern into my movie (pattern.jpg), it is a square image 500x500. I want to draw that image onto an irregular shape. If I do the following it simply shows the large square overtop of my shape. The pattern isn’t actually applied to my shape.

```auto
var bitmap:BitmapData = new BitmapData(500, 500, true, 0x00000000);
myShape.attachBitmap(bitmap,1,"auto",true);
bitmap.draw(pattern);

```

Any Ideas?

Thanks
