tmeh
09-10-2008, 06:34 PM
Hello,
I've been buggering about gettin this fixed for quite some time now, and have decided I should probably see if someone can help me out, and save me alot more time.
Basically I am loading an external SWF (mostly AS2 games) into a an AS3 project (Flash CS3). I have tried loading it into a movieclip holder, and also adding the loader, and content, directly onto the stage.
My problem is that there are numerous scaling issues with this. Since the SWF's come in varied dimensions, and I would like them all to fit in the same space, I am trying to reduce their size to fit this area. I have attempted scaling/force defining dimensions for the loader, the loader's content, and the holder MC, and none of these seem to work properly consistantly .
Basically I use the loader info to determine the dimensions of the SWF I am loading, and then redefine it (it being the loader, content, or mc holder - i've tried them all) to fit the height I want, and adjust the width to match the aspect ratio.
When I try this, the loaded SWF seems to change to random sizes, even so much so that it will be different upon re-publishing the flash file numerous times.
As an example, lets say I load an external SWF that is 400x300 onto a stage that is 600x400, and I am trying to get the SWF to be 200x[whatever maintains aspect ratio]. The result is that the SWF's height ends up being about 20% or even 60-70% of the stage, visually. When I decide to trace the width/height of the SWF AFTER it has been resized, and looks wrong on stage, it returns the correct dimensions (200x[whatever]). Why would it be doing this? It says it has been resized properly via trace, but what I see is completely different.
So after trying a million game SWF's to load, some of the actually work (locally) by chance. So I decide to upload it a webserver, and try it out there. Well, here is another problem which boggles my mind. When I open the site with IE7, the SWF (1/1000000 that actually worked locally), scales perfectly and functions. However, when I open the site with FF, again the scaling goes all bonkers, and decides it wants to be 80% the height, for example, of the space I'm trying to fit it in, and thus 80% of the height it appeared as in IE7. And also, it rarely, but sometimes DOES work in FF. This is the same webpage with the same Flash AS3 swf loading the SAME game swf. Same conditions, completely varied results.
Would anyone know why trying to resize an loaded SWF is so buggy? and ideally, anyone know how to fix this problem?
To reiterate, I want to scale a swf I am loading, and have been incapable because it decides to be any random dimensions it wants to when I try scaling it.
Any help or direction would be greatly greatly appreciated, as I have not been able to find any help or documentation of these errors online, and it is driving me crazy.
Thank you very much in advance if you can offer any help.
-
G
I've been buggering about gettin this fixed for quite some time now, and have decided I should probably see if someone can help me out, and save me alot more time.
Basically I am loading an external SWF (mostly AS2 games) into a an AS3 project (Flash CS3). I have tried loading it into a movieclip holder, and also adding the loader, and content, directly onto the stage.
My problem is that there are numerous scaling issues with this. Since the SWF's come in varied dimensions, and I would like them all to fit in the same space, I am trying to reduce their size to fit this area. I have attempted scaling/force defining dimensions for the loader, the loader's content, and the holder MC, and none of these seem to work properly consistantly .
Basically I use the loader info to determine the dimensions of the SWF I am loading, and then redefine it (it being the loader, content, or mc holder - i've tried them all) to fit the height I want, and adjust the width to match the aspect ratio.
When I try this, the loaded SWF seems to change to random sizes, even so much so that it will be different upon re-publishing the flash file numerous times.
As an example, lets say I load an external SWF that is 400x300 onto a stage that is 600x400, and I am trying to get the SWF to be 200x[whatever maintains aspect ratio]. The result is that the SWF's height ends up being about 20% or even 60-70% of the stage, visually. When I decide to trace the width/height of the SWF AFTER it has been resized, and looks wrong on stage, it returns the correct dimensions (200x[whatever]). Why would it be doing this? It says it has been resized properly via trace, but what I see is completely different.
So after trying a million game SWF's to load, some of the actually work (locally) by chance. So I decide to upload it a webserver, and try it out there. Well, here is another problem which boggles my mind. When I open the site with IE7, the SWF (1/1000000 that actually worked locally), scales perfectly and functions. However, when I open the site with FF, again the scaling goes all bonkers, and decides it wants to be 80% the height, for example, of the space I'm trying to fit it in, and thus 80% of the height it appeared as in IE7. And also, it rarely, but sometimes DOES work in FF. This is the same webpage with the same Flash AS3 swf loading the SAME game swf. Same conditions, completely varied results.
Would anyone know why trying to resize an loaded SWF is so buggy? and ideally, anyone know how to fix this problem?
To reiterate, I want to scale a swf I am loading, and have been incapable because it decides to be any random dimensions it wants to when I try scaling it.
Any help or direction would be greatly greatly appreciated, as I have not been able to find any help or documentation of these errors online, and it is driving me crazy.
Thank you very much in advance if you can offer any help.
-
G