Dear GreenSock and forum-members,
I'm building a site using the AutoFitArea feature of GreenSock.
Let me quickly explain the setting.
I have an swf with the menu's - let's call this one the framework.swf.
In this swf I a movieclip which will contain the content to be shown on childIndex(0) and a movieclip with two menu's (one left, one right) at childIndex(1).
Clicking an item from the menu's needs to change the content of the lower movieclip (sounds logical ).
So, when a menu-item is clicked, an external swf - let's call this one content.swf - is loaded into the framework content movieclip.
This content movieclip in the framework.swf is attached to an AutoFitArea which has the same dimensions as the stage.
The content.swf has two custom made movieclips in the library which are exported for AS; one with the background and one with the content.
Within content.swf I add both custom made movielcips with addChild. Also in this swf I create another AutoFitArea for the content.
The result is that the background is perfectly adapting itself with PROPORTIONAL_OUTSIDE whenever the screen is resized. This works perfectly.
The problem is the content movievlip in content.swf. The dimensions set during init are 720x550, and when attached the movieclip I specify that the minimum size is 720x550 and no limitations for maximum size.
720 is the widht of my stage minus the width of both menus. Align mode is set two times to CENTER, and during init of the AutoFitArea I set x to stageWidth / 2 and y to stageHeight / 2.
When running the framework.swf and clicking the menu-item, content.swf is shown with a perfect working background, but the content itself is always messing up.
The x and y values are not always correct with the result the movieclip is never centered in my stage and background.
The size of the content is smaller than specified (i.e.: 550x410) while the movieclip has exact the same aspect ratio.
When running content.swf stand-alone it works fine, so I think maybe there's a conflict as I have a AutoFitArea in framework.swf and content.swf.
I've been playing with this already all day, without much positive results, so any tips/help are highly appreciated!
Hoping for some inspiring tips
Thanks in advance...
Cheers,
Roel