Jump to content
Search Community

SOLVE: 1/3 center Column: LiquidStage,LiquidArea,pinCorners

vmedium test
Moderator Tag

Recommended Posts

Just thought I would share, this was very helpful in understanding, thanks to Jack.

 

pinCorners is important:

http://www.greensock.com/as/docs/tween/ ... inCorners()

 

 

import com.greensock.layout.*;

stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;

var w:Number = 1920; //width of stage
var h:Number = 1080; //height of stage
var ls:LiquidStage = new LiquidStage(this.stage, w, h, 853, 480);
var area:LiquidArea = new LiquidArea(this, w/3, 0, w/3, h, 0xEEEEEE);
area.preview = true;
var topLeftPin:PinPoint = new PinPoint(area.x, 0, this.stage);
var bottomRightPin:PinPoint = new PinPoint(area.x + area.width, area.height, this.stage);
area.pinCorners(topLeftPin, bottomRightPin);

area.attach(mc, {vAlign:"bottom", hAlign:"center", scaleMode:"widthOnly"});

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