-
Is this possible
So lets say i have 2 swfs, one of which is the primary site (A), 1 of which is only triggered for certain frames (B).
If B is be default set to a height of 1px and 100% width, and it contains nothing more than a LocalConnection listener class, would it be possible to load a child swf that has a height of 250px and have it expand the page vertically?
Also with that in mind, if that first part is feasable, would it then be possible to get the dimensions of the child swf that is being loaded, and send them via javascript to toggle a div container to display to the childs height?
Any other suggestions on best methods to approach a scenario like this?
-
Set your stage scaleMode to no resize. Then load in your second swf and position it's y-coordinate at 0. Use ExternalInterface to send the height of swf A out to a javascript function and have javascript resize the plugin and surrounding page layout. The only part I'm not positive about is having js affect the plugin object after it's rendered...I suspect you'll get into trouble with different browsers that way.
Alternately, you could just put swf B into a 250px div that is hidden and when swf A finishes loading, call a js function to unhide the div...I suspect you'll get better luck with that approach.
-
the problem with that approach is that swf B is a variable height, sometimes it'll be like 200px tall, other times it will be 400px tall.
-
You should be able to get away with setting no-resize in your AS, and then setting the plugin to 100% height...then resize the div...
-
% is referring only to the browser size. It does not change the actual movie size. Your parent movie needs to be of the same size as your childmovie or larger.