Hi i am currently designing a flash section for my site and i needed the Bg to be tiled however when i use the tiling code the tiles are displayed correctly except for the fact that the tiles are now covering all the other elements on the stage so that alls i can see are tiles. the tile code i am using is below i would appreciate it if any1 knows how i might display the tiles behind all other elements on my stage thanks
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, tileBG);
var tile:Sprite;
function tileBG(event:Event=null):void {
var oldTile:Sprite = tile;
tile = new Sprite();
tile.graphics.beginBitmapFill(new Pattern(0, 0));
tile.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
tile.graphics.endFill();
addChild(tile);
if (oldTile != null && oldTile != tile) {
removeChild(oldTile);
}
}
tileBG();