I had an application that uses set width and height and when placed in an embed 
with different dimensions did not scale correctly. I was able to solve it by 
setting the property:

stage.align = StageAlign.TOP_LEFT;

then on resize or added to stage set the scaling myself:

            private function updateScaling():void{
                if(stage.stageWidth != width || stage.stageHeight != height){
                    var scaling:Number = 1;
                    if(width>height){
                        scaling = stage.stageWidth / width;
                    }else{
                        scaling = stage.stageHeight / height;
                    }
                    scaleX = scaleY = scaling;
                }
            }






________________________________
From: johndoematrix <johndoemat...@yahoo.com>
To: flexcoders@yahoogroups.com
Sent: Tuesday, December 30, 2008 5:18:48 AM
Subject: [flexcoders] how to scale an entire flex application including text 
and images


hello guys... i thought by using % width and height would help scale a
flex application depending on different screen sizes but i realized
that the controls such as text are not scaled which leads to scroll
bars being created. this makes the application ugly. is there a way to
scale the entire application so that it the screen is smaller then the
text and other controls are scaled to fit the flex UI. 

    

Reply via email to