How can I use a movieclip instead of a bitmap for the tile background pattern?
var tile:BitmapData = new tileImg(0,0);
var tileLayer:Sprite;
function tileBgF(e:Event=null):void {
tileLayer = new Sprite();
tileLayer.graphics.beginBitmapFill(tile);
tileLayer.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
tileLayer.graphics.endFill();
addChildAt(tileLayer,0);
}
Thanks.
Uli
This is assuming you have some custom movieclip that you want to use (
MyClipin my example) and also assuming that you don’t have other data on these movie clips and a new instance is sufficient for use as background elements.Also worth noting, this is going on the assumption that either it doesn’t matter if the movieclips are partially cropped by the stage edges or that they’re sized perfectly to fit within the stage bounds in a nice even number.