# Oop hell

**URL:** <https://forum.kirupa.com/t/oop-hell/219235>\
**Category:** Uncategorized\
**Created:** [March 14, 2007, 11:50pm UTC](https://forum.kirupa.com/t/oop-hell/219235 "2007-03-14T23:50:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![W84me](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/w84me/32/1257_2.png) [@W84me](https://forum.kirupa.com/u/W84me)\
**Post date:** [March 14, 2007, 11:50pm UTC](https://forum.kirupa.com/t/oop-hell/219235/1 "2007-03-14T23:50:39Z")

</div>

Hi all,

I am trying to make a class that makes a tiled background but i cant make it to work.

Here is the code:

```auto
import flash.display.BitmapData;
class StageMaker {
    var pattern = "pattern";
    function StageMaker() {
        this.fillBG(pattern);
    }
    function fillBG(tile) {
        this.beginBitmapFill(tile);
        this.lineTo(Stage.width, 0);
        this.lineTo(Stage.width, Stage.height);
        this.lineTo(0, Stage.height);
        this.lineTo(0, 0);
        this.endFill();
    }
}

```
