var stageListener:Object = new Object();
stageListener.originalWidth = 1000;
stageListener.originalHeight = 700;
Stage.scaleMode = "noScale";
Stage.align = "B";
updateStage = function () {
if (selectedPage == undefined) {
lepel._height = Stage.height;
}
lepel._width = Stage.width+2;
sky.bg._width = Stage.width;
sky.bg._height = Stage.height;
sky["sky"+selectedPage].linear._width = Stage.width+2;
footerBg.Update();
};
stageListener.onResize = function() {
StageLeft = -1*(Stage.width-this.originalWidth)/2;
StageTop = -1*(Stage.height-this.originalHeight);
StageRight = StageLeft+Stage.width;
StageBottom = 700;
updateStage();
};
stageListener.onResize();
Stage.addListener(stageListener);