This content has been marked as final. Show 3 replies
can you email me your problem as so I can take a look dazfaz at hotmail.com
Of course questions like this are much easier to answer when the code is in front of one.
Are you loading the external swfs into the same MovieClip? If you are then you might want to reset the _xscale and _yscale to 100 before you get the _width and _height of the newly loaded clip.
If you have things on your eternal swf that are "off the stage" they will be included in the size of the external file or alternately if you only have one small item in the middle of the screen (or some such) the width and height will reflect that as well. There is no property of a published swf that tells you what its stage dimensions were supposed to be. So unless you include that or make sure that the first frame of the clip has a rectangle the size of the stage you will get "interesting" results sometimes.
I think I'm facing a similar kind of problem.
In essence I have 3 swfs.
The first is the container.swf - this loads in two swfs using the following
var swfloader:MovieClipLoader = new MovieClipLoader();
It has publish settings of 100% for width and height, and scale is "exact
The desired effect is that bg.swf should completely fill the browser window,
whilst maincontent.swf sits ontop of bg.swf.
Now, bg.swf fills the window fine when loaded in on its own BUT when
maincontent.swf is loaded aswell, bg.swf fails to fill the entire window.
I suppose the desired effect is something between this....
(see the way the background and content seem 'independant of each other when
the window is resized)
Any ideas guys... ?
"Kapil Mohan" <firstname.lastname@example.org> wrote in message
> Hey All,
> I am builidng a player in Flash MX 2004 which will show externally loaded
> SWFs to the user. One SWF at a time. The user is going to have back-next
> type navigation controls. Thats all. Simple.
> But I am facing a wierd problem in loading external SWFs. I want to be
> to resize the external SWFs into a fixed area while maintaining the aspect
> ratio of the loaded SWF. This action is happening unreliably for me. In
> SWFs, my solution is working fine and in some it is not. Result is that I
> sometimes getting SWFs which are smaller in size than what I want (as in
> they dont fill up whole viewable area even when they can). Note that this
> happening only in some SWFs and not all of them.
> I am tempted to think that this might be because some SWFs are somehow
> different than the SWFs which work fine. But I am clueless what this
> difference could be. All external SWFs have only one frame. And there
> framerate is also same. I am resizing all SWFs in loadClip.onLoadInit. The
> resizing code tries to fit the loaded SWF into a fixed area while
> maintaining its aspect ratio.
> I have tried using MovieClip.loadClip and also the Loader component that
> comes with Flash MX 2004.
> Is there anything which I am missing out here, or could there be any
> attribute in the external SWF which might make it behave differently than
> others when resized.
> Kindly help me. This issue is really giving me jerks now. Thanks!
> Kapil Mohan