Jump to content
GreenSock

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

footer bar

Recommended Posts

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

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

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