Jump to content
Search Community

liquidStage: Object in liquidArea Resize Unpredictable

arcadiabc test
Moderator Tag

Recommended Posts

Hello all,

 

Trying to get liquidStage to work correctly. When I try to resize the objects in with the the liquidArea snap to different dimensions sporadically.

 

Below is a link show the site I am working on. If you click on any of the items form the dropdown and then resize you will that that the objects, both he navigation bar and the content loading at the bottom don't resize with the liquidArea.

 

Also, you will notice in the code below that I am using the same liquidState object for 2 liquidAreas. The area2 is for green bg.

 

http://f56k.com/clients/gigantic/achenson/

 

Hope anyone can point me in the right direction. Thank you in advance.

 

private function liquidStateMethod():void
	{		
		ls = new LiquidStage(this.stage, 1000, 670, 500, 500);

		area1 = new LiquidArea(this,0, 0, 960, 670, 0xFF0000);

                       //_masterContainer contains the navigation bar and the content loader.
		area1.attach(_masterContainer, ScaleMode.PROPORTIONAL_INSIDE, AlignMode.CENTER,AlignMode.TOP,500,960);

		area2 = new LiquidArea(this,0, 0, 960, 660, 0xFF0000);
		area2.attach(_BG, ScaleMode.PROPORTIONAL_INSIDE,AlignMode.LEFT,AlignMode.TOP,500,960);

		ls.addEventListener(Event.RESIZE, onLiquidStageUpdate);
	}


	function onLiquidStageUpdate(event:Event):void 
	{
		_BG.width = stage.stageWidth
		//area1.updatePins();
	}

Link to comment
Share on other sites

Hm, something seems off in your code - are you using a stale version of LiquidArea maybe? Specifically, this line was confusing:

 

area2.attach(_BG, ScaleMode.PROPORTIONAL_INSIDE,AlignMode.LEFT,AlignMode.TOP,500,960);

 

The 5th parameter is supposed to be a Boolean value indicating whether or not the content should be cropped, but you have 500. If you're still running into trouble after you update, please post an example that demonstrates the funky behavior - it's always MUCH faster to troubleshoot an actual file where I can add trace() statements, etc. as opposed to guessing by looking at one small excerpt of code and watching the swf. Many times there are other variables in the context that play a huge part in the issue. You don't need to post your production files - just isolate the issue in a separate FLA in the simplest manner possible.

Link to comment
Share on other sites

  • 2 weeks later...

Its been a few days but I found what was the problem.

 

I was loading movie clips inside the container I pass on the liquidStage that had other mask object within it. As I dynamically changed these masked objects, they varied in width. My mistake was to assume these masked object width would be the same as the mask width and that turn out to be the very wrong. So I just ended up using the ScrollRect property and that fixed all the issues.

 

Thanks.

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