Jump to content
Search Community

roundPosition in LiquidArea

algro test
Moderator Tag

Recommended Posts

I'm using LiquidArea to center the content of my site.

I implemented it like the following:


this._liquidStage = new LiquidStage(this.stage,550,400);
this._area = new LiquidArea(this, 0, 0, 550, 1000, 0xFF0000);
this._area.pinCorners(this._liquidStage.TOP_LEFT, this._liquidStage.BOTTOM_RIGHT,false,0.5, {ease:Cubic.easeIn});
this._area.preview = false;
this._area.attach(this._viewContainer, ScaleMode.NONE,AlignMode.CENTER,AlignMode.TOP,{strict:true,roundPosition:true});


Now I try to get some assets in the viewContainer displayed pixel-perfectly.

Even if I use cacheAsBitmap for those assets, sometimes they appear sharp but sometimes not.

When the stage.stageWidth has an even seize, the assets keep being sharp all the time(also after resizing the browser-window)

When the stage.stageWidth is odd, the appear blurry (also when resizing the browser window)


How could I solve that?

Thanks for any hints.

Link to comment
Share on other sites

It looks like you're using the wrong syntax for your attach() call:


BAD: this._area.attach(this._viewContainer, ScaleMode.NONE,AlignMode.CENTER,AlignMode.TOP,{strict:true,roundPosition:true});


GOOD: this._area.attach(this._viewContainer, {scaleMode:ScaleMode.NONE, hAlign:AlignMode.CENTER, vAlign:AlignMode.TOP, roundPosition:true});


Also, make sure you're using the latest version of the classes (this syntax doesn't work with very old versions of LiquidStage because it was updated to be more flexible in early 2011).

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...