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

« Newer Snippets
Older Snippets »
2 total  XML / RSS feed 

Stage Align

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

vertical align in div

http://www.jakpsatweb.cz/css/css-vertical-center-solution.html

Understandable code:
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
  <title>Universal vertical center with CSStitle>