Jump to content
Search Community

LiquidArea and disappearing content

Monnone test
Moderator Tag

Recommended Posts

Hey guys! I have an odd bug happening and wanted to see if you guys have run across this before. The bottom-line is when I resize the browser window or even just the plain swf the target MC disappears.

 

// bkgrnd
var ls:LiquidStage = new LiquidStage(this.stage, 1200, 800, 0, 0);
var area:LiquidArea = new LiquidArea(this, 0, 0, 1200, 800, 0x313f19);
area.preview = false;
area.attach(bkgrnd_mc, ScaleMode.PROPORTIONAL_OUTSIDE);

// content
var areaC:LiquidArea = new LiquidArea(this, 0, 0, 1200, 1050, 0x313f19);
areaC.preview = true;
areaC.attach(c_mc, ScaleMode.PROPORTIONAL_INSIDE);

 

Really, it all seems pretty straight forward. I can't find the issue.

 

Thanks in advance!

Link to comment
Share on other sites

I don't see any obvious problems. Could you post a simple FLA that demonstrates the issue? Are you using the latest version of the classes? Does your object have a valid width/height at the time you attach() it or is it empty at that time (maybe you're loading stuff into it later)? You should definitely not attach() an object that has no width or height because when LiquidArea tries to determine how much to scale it to fit into the area, it'll come back as INFINITY. :)

Link to comment
Share on other sites

I found the problem. Google Maps AND SlideShow Pro. argh. I've commented both components one at a time...when SSP is commented the content is shrunk considerably but still on the viewable stage. When GMs is comment but not SSP the content is gone, I'm sure just way off stage or something. With both commented, LiquidArea works as it should.

 

Do you have any advice on how I can scale my content down and keep these components?

 

Thanks!

Link to comment
Share on other sites

It just occurred to me that maybe LA is trying to compensate for masked objects even inside these components, even though my content area only shows to be 1200x1050. Could this be the case? If so, is there a way I can tell LA to just use a particular size and apply that setting to the content MC to be resized even though it may be in fact larger?

 

Thanks so much!

Link to comment
Share on other sites

Is there a simple way to use LiquidStage for the background image yet keep the center content (all in one MC) scalable when the user re-sizes the browser. I think that would be a simple solution rather then trying to use LiquidArea in this instance...As LS s works now, if it prevents all other objects from scaling even though it's a part of LS.

 

Thoughts

Link to comment
Share on other sites

...is there a way I can tell LA to just use a particular size and apply that setting to the content MC to be resized even though it may be in fact larger?

That sounds like exactly what the customBoundsTarget special property is for. Make sure you're using the latest version and check out the ASDocs for details: http://www.greensock.com/as/docs/tween/ ... ml#attach()

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.
×
×
  • Create New...