# Preloading tiled background

**URL:** <https://forum.kirupa.com/t/preloading-tiled-background/238058>\
**Category:** Uncategorized\
**Created:** [September 6, 2007, 7:08pm UTC](https://forum.kirupa.com/t/preloading-tiled-background/238058 "2007-09-06T19:08:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![snozbunny](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@snozbunny](https://forum.kirupa.com/u/snozbunny)\
**Post date:** [September 6, 2007, 7:08pm UTC](https://forum.kirupa.com/t/preloading-tiled-background/238058/1 "2007-09-06T19:08:37Z")

</div>

I’m trying to complete tutorials on [gotoandlearn.com](http://gotoandlearn.com) but the fullbrowser backgrounds and the preloader clash. The instructions say to import the tiled graphic on the first frame but that obviously takes a while to load and cancels out the preloader. Unfortunately I can’t just plunk the background into a layer. Is there a action script that will load the graphic without placing it on stage? I assume you can use attachMovie but that seems clunky. Any suggestions?

```auto
import flash.display.BitmapData;
container._x = Stage.width/2;
container._y = Stage.height/2;
var tile:BitmapData = BitmapData.loadBitmap("tile");

function fillBG() {
    this.beginBitmapFill(tile);
    this.moveTo(0,0);
    this.lineTo(Stage.width,0);
    this.lineTo(Stage.width,685);
    this.lineTo(0,685);
    this.lineTo(0,0);
    this.endFill();
}

fillBG();

```
