Jump to content
GreenSock

XXNephilim

Preserving LiquidArea Positioning & Scaling

Recommended Posts

Hi again,

 

This is 2nd part of my attempt to learn basics of LiquidStage, LiquidArea and other GreenSock most awesome tools!

 

(1st part of basics can be found in this thread if anyone is interested: viewtopic.php?f=3&t=3641)

 

Now, thanks to Jack's help - I have one LiquidArea that servers as full screen background and another LiquidArea that servers as 'main frame' of the test/learning website I am doing.

 

Both areas are working perfectly - as in positioning and scaling exactly as I want them to! Great!

 

 

Now, my latest problem...

 

 

What I want to do next is to load external SWF into 2nd 'main frame' LiquidArea which is centred in the middle of the stage.

 

So I did the following in the 'main frame' movie clip:

 

import com.greensock.*;

import com.greensock.loading.*;

 

var loader:SWFLoader = new SWFLoader("testloading.swf", {name:"mainSWF", container:this, x:0, y:0, estimatedBytes:9500});

 

loader.load();

 

 

It works! It loads my SWF no problem and it dynamically scales it as intended... Awesome!

 

 

BUT - it works only IF I am using static content on that SWF... :(

 

IF I use any dynamic content - such as XML based image / video viewers which use various thumbnail and / or image / video scrollers (that are obviously 'bigger and come off' from the swf's stage size) entire LiquidArea POSITIONING as well as SCALING gets screwed up...

 

 

Funny thing is that initially it does position and scale itself properly BUT as soon as browser window is resized positioning and scaling goes wrong...

 

This leads me to conclusion (most probably wrong one!) that some sort of EVENT LISTENER is needed somewhere to maintain LiquidArea's position and scale values !?

 

 

This problem isn't that easy to explain using words but hopefully people will understand what I mean...

 

 

Many thanks for reading and possible help!

 

 

PS:

 

Jack or anyone else. In case non of this I wrote makes any sense let me know and I will email / post source files so you can have a look.

Link to comment
Share on other sites

Holly crap!!!!

 

I think I am close to solving this problem with use of - crop: Boolean - optional var property!

 

Almost there! :)

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