# How to fill a irregular movieclip with a bitmap pattern?

**URL:** <https://forum.kirupa.com/t/how-to-fill-a-irregular-movieclip-with-a-bitmap-pattern/288262>\
**Category:** flash\
**Created:** [May 13, 2009, 3:02pm UTC](https://forum.kirupa.com/t/how-to-fill-a-irregular-movieclip-with-a-bitmap-pattern/288262 "2009-05-13T15:02:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blitzer](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/blitzer/32/2717_2.png) [@Blitzer](https://forum.kirupa.com/u/Blitzer)\
**Post date:** [May 13, 2009, 3:02pm UTC](https://forum.kirupa.com/t/how-to-fill-a-irregular-movieclip-with-a-bitmap-pattern/288262/1 "2009-05-13T15:02:22Z")

</div>

Hey folks.  
The subject pretty much sums it up; I have a bunch of movieclips on the stage, that are already filled with a bitmap pattern in the IDE. Now I need to fill them with another pattern once they are clicked, and I can´t seem to figure out how to do it.

This is the closest yet, but i just get a recangle with the new pattern behind my selected mc. I realize that the rectangle comes from the drawRect method (duh) but I cant seem to find something the will allow me to fill the entire movieclip with the new pattern.

Can someone point me in the right direction? :hat:

in District.as

```auto
public function doSelect(){
_selectPattern = new SelectPattern(0,0); //class from my library
this.graphics.beginBitmapFill(_selectPattern);
            
this.graphics.drawRect(0, 0, width, height);
this.graphics.endFill();
}

```
