If you're aiming for a fluid layout, where everything is positioned/sized based on the size of the stage, you might need to look at Stage.scaleMode = StageScaleMode.NO_SCALE. This mode means that nothing is scaled, however, so it could mess up your work flow.
You can, however, add an event listener for when the stage's size is adjusted (unlike with the showAll scale mode, that Nig 13 pointed out) so that you can adjust the size of your content. A basic example would be:
The stage.align property says that all objects are positioned from the top left, so at the very top left, x and y are 0. So placing menuBar at x = 0 will attach it to the left side of the stage, and resizing the width to equal the stage's width will simply stretch it out across the page.
Great, Danny22, but maybe he's using AS2 since he mentioned this: Stage.scaleMode = "showAll";
It's a bit different in AS2, but the concept is the same:
Actionscript Code:
Stage.scaleMode = "noScale"; Stage.align = "TL";
resizeListener = newObject(); resizeListener.onResize = function(){ // example code, this will align // a movieclip to the center of your Flash mc._x = Stage.width/2; mc._y = Stage.height/2; } Stage.addListener(resizeListener);
There was a good tutorial in AS2 for this as well, but it was deleted recently
17 Years old boy, who loves the Computer Technology
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
Great, Danny22, but maybe he's using AS2 since he mentioned this: Stage.scaleMode = "showAll";
It's a bit different in AS2, but the concept is the same:
Actionscript Code:
Stage.scaleMode = "noScale"; Stage.align = "TL";
resizeListener = newObject(); resizeListener.onResize = function(){ // example code, this will align // a movieclip to the center of your Flash mc._x = Stage.width/2; mc._y = Stage.height/2; } Stage.addListener(resizeListener);
There was a good tutorial in AS2 for this as well, but it was deleted recently
Yikes, good point. I only ever did a tiny bit of AS2 and for some reason thought that either the string of the StageScaleMode property was the same. Also, I need to tab out my code better, heh.