Generally when you scale any DisplayObject
, all of its children will scale with it. However it is possible to prevent the stage
from scaling on a resize. Try this:
this.stage.scaleMode = StageScaleMode.NO_SCALE;
this.stage.align = StageAlign.TOP_LEFT;
EDIT: To get the kind of behavior you're looking for, you would have to manually perform some of the reszing. You will need to include the two lines of code above as it is the only way to prevent all of the content from scaling. Now add a resize handler so that you can scale only the DisplayObject
instances that you wish to resize, while keeping everything else the same:
stage.addEventListener(Event.RESIZE, stageResize);
function stageResize(event:Event):void {
myBackground.width = stage.stageWidth;
myBackground.height = stage.stageHeight;
// ...
}