# How do i tile image horizontally (end efficiently)

**URL:** <https://forum.kirupa.com/t/how-do-i-tile-image-horizontally-end-efficiently/302875>\
**Category:** Uncategorized\
**Created:** [January 9, 2010, 3:47am UTC](https://forum.kirupa.com/t/how-do-i-tile-image-horizontally-end-efficiently/302875 "2010-01-09T03:47:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![softeye](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@softeye](https://forum.kirupa.com/u/softeye)\
**Post date:** [January 9, 2010, 3:47am UTC](https://forum.kirupa.com/t/how-do-i-tile-image-horizontally-end-efficiently/302875/1 "2010-01-09T03:47:06Z")

</div>

hi,

I have an image (grass pattern) that i would like to dynamically tile on stage:

the image located in library and exported to AS  
code:

```auto

    var bmd:BitmapData = new grass(width, height);
    this.graphics.beginBitmapFill(bmd);
    this.graphics.drawRect(0, 400, stage.stageWidth, stage.stageHeight);
    this.graphics.endFill();

```

the problem with this code it draws a rectangle, and i like to tile the image horizontally.  
is there a drawLine command like?, I couldn’t find any.  
is there more efficient way to it?  
thx,  
daniel
