Jump to content
Search Community

Liquid stage

un4given test
Moderator Tag

Recommended Posts

Hello,

 

I am having a issue with liquid stage. I have set the minimum and the maximum size that the website can be.

 

The problem is that there are some items that sit off stage until called. And when I change the size of the browser, liquid stage accommodates but incorporates the 'hidden' items as part of the stage.

 

Is there a way around this?

Link to comment
Share on other sites

If I understand the question correctly, you could just pin those items to the respective edges of the screen (like TOP_RIGHT for the ones off the right edge and TOP_LEFT for the ones off the left edge). Then, later, if you need to release them, simply use LiquidStage's release() method.

Link to comment
Share on other sites

Is there a way to use x and y values for the pins? rather then TOP_RIGHT and BOTTOM_LEFT?

 

That way I could just set the x and y to the stage's x and y, as TOP_LEFT and BOTTOM_RIGHT seems to senses the size whole of the movie clip its attached to.

and because I load a swf into the movieclip which contain items of the stage, which in term changes the size of the movieclip beyond the size of the stage.

 

below is a link to my loader fla and first page. I dont think I am explaining the problem very well. If you could take a look I would be very thankful.

 

[Link removed because it contained members-only code]

Link to comment
Share on other sites

I ran into a few problems with your files:

 

1) I couldn't publish without running into errors complaining that it couldn't load TweenExample/xml/portfolio8.xml (you didn't include it)

 

2) Your zip contained members-only classes, so I had to remove the link - please don't publicly post files containing LiquidStage, SplitTextField, or any of the bonus plugins.

 

I'm not sure this answers your question exactly, but you can create a custom PinPoint anywhere you want - you do NOT need to only use the pre-built ones like TOP_LEFT, TOP_RIGHT, CENTER, etc. For example, to create one that's 100 pixels from the top of the native stage and 500 pixels from the left, you'd do:

 

var myPoint:PinPoint = new PinPoint(500, 100, this.stage);

 

Or you can define a point inside any DisplayObject (not just the stage) by changing the 3rd parameter. It should give you a lot of flexibility. You can even use a DynamicPinPoint if you need the x/y to be dynamically calculated on the fly (just point it to a function that you define which returns a Point object). There are notes about this in the ASDocs.

 

If you'd like me to look at the files, please post a complete set that can be published without errors. It would actually be much better if you isolated things in a separate, simplified set of files (to eliminate the "noise" introduced with extra code). But maybe the PinPoint and DynamicPinPoint tips I mentioned above will lead you to a solution.

Link to comment
Share on other sites

I just uploaded a new version of LiquidArea/AutoFitArea that recognizes a new "customBoundsTarget" property in the attach() and createAround() methods. I switched to using a generic vars object there too in order to make things more readable and concise. The ASDocs have been updated too. So what this allows you to do is define a child object of the target that you can use to define custom bounds. For example, if parentBox contains box1, box2, and box3 arranged horizontally, but you only want box2 (the center one) to fill the AutoFitArea, you’d do:

 

myArea.attach(parentBox, {customBoundsTarget:parentBox.box2, scaleMode:”proportionalOutside”, crop:true});

 

I'm not sure this perfectly addresses your question, but hopefully it helps. If you're looking to pin your sub-clips to the edge of the area, you could wait until your sub-swf loads, then pin them like:

 

ls.attach(playcity.rawContent.bigboardrope1_mc, ls.TOP_LEFT);
ls.attach(playcity.rawContent.bigboardrope2_mc, ls.TOP_RIGHT);

 

Get the latest version by logging into your GreenSock account at http://www.greensock.com/account/

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