Share Posted April 15, 2011 Trying to create a footer bar that scale width only and stays at bottom on browser resize. Using liquid stage and liquid area I got the bar width to resize, but the pin is not working properly. Here is the code: var ls:LiquidStage = new LiquidStage(this.stage,1024,768,640,480); var foot:LiquidArea = new LiquidArea(this,0, 738, 1024,30); foot.attach(footer, ScaleMode.WIDTH_ONLY); ls.attach(footer, ls.BOTTOM_CENTER); What am I doing wrong? Link to comment Share on other sites More sharing options...
Share Posted April 20, 2011 The problem is that you attached it to a LiquidArea AND you pinned it with LiquidStage. It only makes sense to do one or the other (otherwise they'd fight for control). Make sure you have the latest version of the LiquidStage classes and then your code should look more like: var ls:LiquidStage = new LiquidStage(this.stage, 1024, 768, 640, 480); var foot:LiquidArea = new LiquidArea(this, 0, 738, 1024, 30); foot.attach(footer, {scaleMode:ScaleMode.WIDTH_ONLY, vAlign:AlignMode.BOTTOM}); Another way you could get the same result is: var ls:LiquidStage = new LiquidStage(this.stage, 1024, 768, 640, 480); var foot:LiquidArea = new LiquidArea(this, 0, 738, 1024, 30); foot.pinCorners(ls.BOTTOM_LEFT, ls.BOTTOM_RIGHT); foot.attach(footer, {scaleMode:ScaleMode.WIDTH_ONLY}); Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now