Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
gjacob

LiquidStage / LiquidArea resize Problem

Recommended Posts

Hello,

 

I am trying to use the LiquidStage / LiquidArea classes and am having a problem with multiple instances.

 

In my Preloader I have an image that is stretched

 

ls = new LiquidStage(this.stage, stage.stageWidth, stage.stageHeight, 1000, 550);

la = new LiquidArea(this, 0, 0, stage.stageWidth, stage.stageHeight);

la.attach(preloaderContainer, ScaleMode.PROPORTIONAL_OUTSIDE);

 

This always works fine.

 

when the Preloader is finished I start my Application and do the same thing with a color version of this image i was showing in the Preloader.

 

This also works fine as long as I don't not resize the window before the Preloader is finished. If i do this the second image is moved about the distance that the browser was resized.

 

Does anyone have any tips for what could be causing this.

Link to comment
Share on other sites

  • 2 weeks later...

Not sure I understand the question accurately, but it strikes me as odd that you're using stageWidth/stageHeight because one of the whole purposes of LiquidStage is to allow you to build things at a native size and then have LiquidStage stretch/scale/move things accordingly when the stage is a different size. Why not use the native values?

 

BAD:

ls = new LiquidStage(this.stage, stage.stageWidth, stage.stageHeight, 1000, 550);
la = new LiquidArea(this, 0, 0, stage.stageWidth, stage.stageHeight);
la.attach(preloaderContainer, ScaleMode.PROPORTIONAL_OUTSIDE);

 

GOOD: (assuming your native size is 1000x550)

ls = new LiquidStage(this.stage, 1000, 550, 1000, 550);
la = new LiquidArea(this, 0, 0, 1000, 550);
la.attach(preloaderContainer, ScaleMode.PROPORTIONAL_OUTSIDE);

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×