Share Posted September 12, 2012 Hello, I hope someone can help me. Im using liquidstage to "pin" my DisplayObjects all good until I came across a problem with the navigation menu im working. I need the lines that are above the menuNav_mc (image01 attached file) stay at the TOP_LEFT (like image02 attached file) when the stage is resized but still the menuNav_mc buttons stay at the BOTTOM_LEFT. I have to mention that the lines are inside menuNav_mc This is the AS3 code of the example im making so far: var ls:LiquidStage = new LiquidStage(this.stage, 1024, 750, 1024, 750); ls.attach(logo_mc, ls.TOP_LEFT, false, true, 0); ls.attach(menuNav_mc, ls.BOTTOM_LEFT, false, true, 0); ls.update(); Link to comment Share on other sites More sharing options...
Share Posted September 13, 2012 Have you tried pinning each object accordingly? I only see you attaching logo_mc and menuNav_mc, but no children of menuNav_mc. Link to comment Share on other sites More sharing options...
Author Share Posted September 13, 2012 Hi Jack, the problem is that i have never used the pinpoint before, can you help me with an example or documentation plz? Link to comment Share on other sites More sharing options...
Author Share Posted September 13, 2012 I found an example and documentation about "pinpoint" but it seems to me that I still do not understand, I'm doing the example with one line. What I need is the line stretch to menuNav_mc when the stage resized. this is my code: var ls:LiquidStage = new LiquidStage(this.stage, 1024, 750, 1024, 750); //var pin:PinPoint = new PinPoint(0, 0, linea01_mc); //ls.attach(logo_mc, ls.TOP_LEFT, false, true, 0); ls.attach(linea01_mc, ls.TOP_LEFT, false, true, 0); ls.attach(menuNav_mc, ls.BOTTOM_LEFT, false, true, 0); ls.update(); //pin.attach(menuNav_mc); Link to comment Share on other sites More sharing options...
Share Posted September 15, 2012 LiquidStage is just for pinning things, but it sounds like you want to actually resize/stretch objects - that is what LiquidArea is for. If I understand your goal correctly, you could accomplish it by wrapping a LiquidArea around your line and pinning its corners like: var la:LiquidArea = LiquidArea.createAround(linea01_mc, {hAlign:"left"}); la.pinCorners(ls.TOP_LEFT, ls.BOTTOM_LEFT); (and don't pin linea01_mc to the LiquidStage at all - the above code replaces your ls.attach(linea01_mc...) line) Link to comment Share on other sites More sharing options...
Author Share Posted September 18, 2012 Thank you Jack!, this code solved my problem lineas_arr = [ menuNav_mc.linea1, menuNav_mc.linea2, menuNav_mc.linea3, menuNav_mc.linea4, menuNav_mc.linea5]; for each(var lineas:MovieClip in lineas_arr) { var la:LiquidArea = LiquidArea.createAround(lineas, {scaleMode:ScaleMode.HEIGHT_ONLY, hAlign:AlignMode.LEFT, vAlign:AlignMode.TOP}); la.pinCorners(ls.TOP_LEFT, ls.BOTTOM_LEFT); } Greensock classes are great! 1 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