Jump to content
GreenSock

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

LiquidArea disappearing?

Recommended Posts

Hi there, I scanned a few things on the forum before posting but couldnt find much info regarding this problem.


Firstly I have an animation which evolves over time (timeline based using masks and things) this is all contained in one holding mc and is the clip I am trying to scale with the window re-sizing. I have tried the build which at first appears fine but as soon as I adjust the swf window size the content disappears.

I did see the value of calculate visual etc but this doesnt seem to affect anything either. I also just tried putting a solid colour in the background of the anim which is to scale of the animation end frame (fully built) to see if this would help but no. 
import com.greensock.layout.*;
import com.greensock.easing.*;
var ls:LiquidStage = new LiquidStage(this.stage, 1280, 1024, 1280, 1024);
var area:LiquidArea = new LiquidArea(this, 0, 0, stage.stageWidth, stage.stageHeight);
area.attach(mainAnim, {scaleMode:ScaleMode.PROPORTIONAL_INSIDE, calculateVisible:true});

ls.addEventListener(Event.CHANGE, onAreaUpdate);
function onAreaUpdate(event:Event):void {
 trace("updated LiquidArea");
}

Any advice would be greatly appreciated at this point, and apologies for any duh moments.

Link to comment
Share on other sites

It sounds like you've got things inside the target that are moving and changing its dimensions thus throwing the bounds calculation off - have you tried defining a customBoundsTarget? I think you were trying to do that with your "solid color in the background" thing. Just make that into a child Sprite/DisplayObject and use that as your customBoundsTarget. 

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