Flash ?
- Started
- Last post
- 3 Responses
- uprise
I have been playing with stage listeners. I found out how to get something to stay on the right side of my stage. (see below) But... I can't figure out how to get something to stay on the top of the stage. Lets say I just want a bar to always stay on the top. Any help would be great.
Stage.align = "L";
Stage.scaleMode = "noScale";stageListener = new Object();
stageListener.onResize = function() {
expandTop();
};Stage.addListener(stageListener...
expandTop = function() {
rightbox._x = Stage.width - rightbox._width - 0;
}stageListener.onResize();
Thx
- dijitaq0
Stage.align = "LT"; // align the stage to left- top
- uprise0
well, I can't because that throws my other elements off. My main mc I want to keep centered. Sorry I guess it is hard to guess what the hell I am doing. Here is the whole script.
function positionMain() {
main._x = Stage.width / 2 - (main._width / 2);
}logo._x = 0;
Stage.align = "L";
Stage.scaleMode = "noScale";stageListener = new Object();
stageListener.onResize = function() {
expandTop();
};
Stage.addListener(stageListener...
expandTop = function() {
rightbox._x = Stage.width - rightbox._width - 0;
bgholder._width = Stage.width;
//bgholder._height = Stage.height;
};Stage.addListener(main);
main.onResize = positionMain;
positionMain();
stageListener.onResize();stop();
- Timson0
http://flash-mx.html.it/articoli…
tutorial found here : http://flash-mx.html.it/articoli…
it's written in italian but shouldn't be too hard to understand.