Skip navigation
Currently Being Moderated

How to overcome this problem when using auto resizing?

May 2, 2012 1:12 AM

Hi,

 

I am resizing the flash (.swf) file accroding to the browser window to fit on any screen resolution. But the problem I am facing now is related to animations which cross the STAGE area. Say, I have an aeroplane_mc which starts animating from x:-200 to x:1200 (my stage width=1000 & height=600), the my flash (swf) file gets shrink.

 

Because of this problem I cannot make any animation which moves out of stage. Please help me in resolving this problem.

 

The code to resize the window is as below:

 

var myStage:Stage=this.stage;
myStage.scaleMode=StageScaleMode.NO_SCALE;
myStage.align=StageAlign.TOP_LEFT;

function initialDisplay(event:Event):void{
var swfWidth:int=myStage.stageWidth;
var swfHeight:int=myStage.stageHeight;


Background.width=swfWidth;
Background.height=swfHeight;

TitlePage.width=swfWidth;
TitlePage.height=swfHeight;

 
}

addEventListener(Event.ENTER_FRAME,initialDisplay);

Thanks in advance for any help.

 
Replies
  • Currently Being Moderated
    May 2, 2012 1:32 AM   in reply to mdnavaz

    this is probably due to

     

    myStage.scaleMode=StageScaleMode.NO_SCALE;

     

    do you need to use NO_SCALE try SHOW_ALL instead

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points