Jump to content


bug in LiquidBox

Recommended Posts

hello jack!


if you have somthing outside the boundaries of the swf project, LiquidBox resizes automatically the swf object loaded inside it:


create a document with 200/200px, create a mc that covers the whole document 200/200px then test LiquidBox --> everything is fine

now add another mc to this document with 50/50px and place it under; x:-100 nad y:-100 --> LiquidBox bugs and resizes the whol swf so we can see the document!


is it a bug or just a malfunction within my coding?



Link to comment
Share on other sites

Could you post (or e-mail me) an FLA that demonstrates this issue? I just tried recreating it on my end and didn't see any problems at all. Maybe I'm missing something though.

Link to comment
Share on other sites

thank you jack for the reply, i attach an example of this issue to the post.


please open the the b.swf an see it, then open a.swf and see how it decreases the b.swf size.


also, could you please telle me how to use liquidbox and LiquidStage toghter:


i nedd when liquidstage scales a movie clip to lets say; scaleX = 0.5, liquidstage scales thye scaleY to = 0.5 too. because now, whenever I have a widscreen laptop, liquidstage minimizez the movieclip without constraining proportions.


// Liquid layout
LiquidStage.init (this.stage, 1024, 767, 800, 565);

// if the stage needs stretching
if(Capabilities.screenResolutionX < 900 || Capabilities.screenResolutionY < 800)
LiquidStage.stretchObject(container, LiquidStage.TOP_LEFT, LiquidStage.TOP_LEFT, LiquidStage.BOTTOM_RIGHT, true);
LiquidStage.pinObject (container, LiquidStage.TOP_CENTER, true);

Link to comment
Share on other sites

It looks like you didn't init() LiquidStage in your example.


As far as using LiquidBox with LiquidStage, LiquidBox has actually been renamed LiquidWrapper which works pretty much the same - it's just a DisplayObjectContainer that automatically scales its children proportionally to compensate for any scaling/stretching that happens to it. So you addChild() your DisplayObject(s) into the LiquidWrapper and then pin the LiquidWrapper with LiquidStage. You can tell your contents to align center, left, top, bottom, or right. It's pretty simple to get up and running:


var wrapper:LiquidWrapper = new LiquidWrapper(myObject);
LiquidStage.init(this.stage, 550, 400);
LiquidStage.stretchObject(wrapper, LiquidStage.TOP_LEFT, LiquidStage.TOP_RIGHT, LiquidStage.BOTTOM_LEFT);


Also, you can add an event listener to LiquidStage to listen for when it resizes things and then you can run any code you want (like adjusting the scale of an object so that it's proportional). Just do:


LiquidStage.addEventListener(Event.RESIZE, myFunction);


Hope that helps.

Link to comment
Share on other sites

i don't know if you have seen the example i sent, i reattache it agin so that you see the probleme with liquidbox. in this example i don't use liquidstage.


thank you

Link to comment
Share on other sites

another bug is when i load content to the liquidbox then i remove it and reload another content, it doesnt keep the original size, it enlarges the new content, and , i have to manually scaleX and reposition in the center!!!


did you test loading/removing childs from the liquidbox and see what they give?



thank jack!

Link to comment
Share on other sites

Did you receive the files I sent you that demonstrated it working?

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.