Jump to content
GreenSock

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

Adding a background while using Liquid Stage/Area

Recommended Posts

Is it possible to add a background image that fills the entire screen whilst at the same time scaling a sprite that contains the site contents as the browser window is resized?

 

I know that using the Liquid Stage class it is, but the problem that I'm having is that I'm using a couple of MovieClips to contain and limit the content of the site. What I've got at the moment is a master MovieClip (masterContainer_mc) that sits on top wrapping everything else up in it. In that I've got another MovieClip (pageMask_mc) which acts to define the limit of the site that should be made bigger or smaller on resize. I am using the customBoundsTarget property to target this MovieClip as I've got external swfs that are really wide loading and unloading into the main swf and this limits the width of the main swf to the native width and height when the screen is resized.

 

The problem that I'm having is that I can't work out where and how to attach a background image so that it sits behind the two MovieClips and the site contents but also fills the entire screen and also resize when the screen is made bigger or smaller. I can get an image to fill the entire screen but combining this and also the MovieClips limiting the native size of the stage is proving more difficult.

Link to comment
Share on other sites

Can't you just add another LiquidArea behind the other one?

 

If that doesn't help, please post a very simple FLA that demonstrates the concept (please don't post your production files with lots of extra code). I'm having a hard time following exactly what you're trying to do (or what the problem is exactly).

Link to comment
Share on other sites

Thanks for reply.

 

Since posting, I have managed to work out what was going wrong and have found a solution. Essentially what I wanted to have happen, is to dynamically load a background image which will fill the entire screen and also to get bigger or smaller depending on the current browser window size. At the same time I have another sprite that contains the main content of the website. This also needed to shrink or grow depending of how ever big the web browser is. So you had two different LiquidArea's getting bigger and smaller. The problem I was having was that one of the swf's that I was loading into the rectangular sprite (that contains the main site content) was really wide due to a line of thumbnails that extend off screen. To cut a long story short I took your advice from a previous thread and used the customBoundsTarget(); to limit the area that the LiquidArea takes into account when sizing up or down the main sprite container. I had so many dam sprites and shapes going on that I was getting in a real mess so I sorted out the problem by just going back to the drawing board and starting from scratch and it's working now.

 

Thanks again for taking the time to read and reply to my original thread. Sometimes your problem is crystal clear in your own head but trying to describe it is another!

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