# beginBitmapFill with two images?

**URL:** <https://forum.kirupa.com/t/beginbitmapfill-with-two-images/294947>\
**Category:** flash\
**Created:** [August 22, 2009, 9:43pm UTC](https://forum.kirupa.com/t/beginbitmapfill-with-two-images/294947 "2009-08-22T21:43:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shazzmoe](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@shazzmoe](https://forum.kirupa.com/u/shazzmoe)\
**Post date:** [August 22, 2009, 9:43pm UTC](https://forum.kirupa.com/t/beginbitmapfill-with-two-images/294947/1 "2009-08-22T21:43:21Z")

</div>

I have a program that responds to mouse clicks on the stage. Each time the user clicks it draws a horizontal or vertical rectangle composed of 32x32 squares to that point. Currently I am doing the following to fill in the rectangle with a png i have made.

```auto

                // Draw segment
                var myBitmap:BitmapData = new BitmapData(32, 32, false);      
                myBitmap.draw(loader);
                g.beginBitmapFill(myBitmap);
                g.drawRect(pX, pY, rHeight, rWidth);
                g.endFill();

```

However if it is possible I would like to draw a different png at the point when a vertical rectangle links with a horizontal. So is there a way I can draw a png to the first square of the rectangle and tile the remaining with a different tile?
