Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Stage Align (See related posts)

// STAGEALIGN

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);

You need to create an account or log in to post comments to this site.


Related Posts