Jump to content
Search Community

LiquidArea and resizing browser after mc is off the stage

colep test
Moderator Tag

Recommended Posts

My Content ...


_map = new Map();



I want my content to scale with the browser size. So i am using liquid area.


_liquidArea = new LiquidArea(this, 30, 0, 990, 600);

_liquidArea.attach(_holder, ScaleMode.PROPORTIONAL_INSIDE, AlignMode.CENTER, AlignMode.TOP);


I now want to be able to tween _map off the stage and not have everything reset when I resize the browser.


any thoughts? every time i re size the browser everything resets. My content centers. i want it to remain where i tweened it.


thanks for your time,



Link to comment
Share on other sites

do i want to use dynamicTween ?

is there an example of this?


one more note. i am scaling the content as well.

So i understand when i resize liquid area is going apply the initial params. how do i update these params?



Link to comment
Share on other sites

It depends on the effect you're going after. You could just tween the whole LiquidArea itself if you want (just make sure you call the LiquidArea's update() method using the tween's onUpdate so that it refreshes the attached objects as it tweens). Kinda like:


TweenLite.to(myArea, 1, {scaleX:1.5, x:500, y:30, onUpdate:myArea.update});


If you have other stuff that's attached to the LiquidArea, you could just release() the object that you want to tween off the stage right before you tween it. Kinda like:


TweenLite.to(myObject, 1, {scaleX:1.5, x:500, y:30});


Make sense?


As far as dynamic tween, here's an example:


myArea.dynamicTween(1, {width:200, x:500, y:30});


ASDocs are at http://www.greensock.com/as/docs/tween/ ... amicTween()

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