PDA

View Full Version : Loading swf into 100% movie


thehat
06-08-2007, 03:08 PM
Hi All,

First, I'm new here so hello! Apologies if this has been asked before but a quick search with the title says no.

I have an issue that I hope somebody could help with. I'm probably being real stoopid, but here goes...

I have a movie that is scaled to 100% width and height in the browser, and I then need to load in external swf's which must also fit to 100%. At the moment though the swf's I load in seem to adopt their actual stage width in the authoring environment, so if I then try to resize something in that loaded swf like so:
headerBar.topGrad._width = Stage.width;
it resizes to the width of the authoring environment stage of the loaded swf, not the actual browser size. So it seems that there is scope attached to using Stage, but that doesn't seem right to me.

Well, that's a crappy explanation! If anyone can make sense of my babbling I'd love some help!

Thanks,
thehat

atomic
06-09-2007, 12:49 AM
Are you loading the external .swfs in a container clip or on a level?

Have you tried?

headerBar.topGrad._width = _level0._width;

thehat
06-12-2007, 11:54 AM
Thanks for the response atomic, I did try _level0, with some strange results. The mc I was trying to size to the browser width didn't resize straight away, instead it expanded by small amounts as I resized the browser.

I think my problem is that although Stage is a top level domain, it seems to be affected by scope when it is used in relation to dynamically loaded swfs. I've ended up storing the stage dimensions in my positioning class on every resize and referring to that from everywhere else. It's not the most graceful solution though, so if anyone can explain Stage and scope to me I'd appreciate it!