How can i get a Background picture to be full screen in Flash and then anchor the top left when resizing?
At the moment it anchors bottom right. My code is below.
Stage.align = “TL”;
Stage.scaleMode = “noScale”;
bg.onResize = function() {
var imageAspectRatio = this._width/this._height;
var stageAspectRatio = Stage.width/Stage.height;
if (stageAspectRatio>=imageAspectRatio) {
this._width = Stage.width;
this._height = Stage.width/imageAspectRatio;
} else {
this._height = Stage.height;
this._width = Stage.height*imageAspectRatio;
}
this._x = Stage.width/2;
this._y = Stage.height/2;
};
Stage.addListener(bg);
bg.onResize();