View Full Version : SWFLoader scaling
forcemorph
05-14-2007, 04:05 PM
Hey all, I'm having a tough time figuring out how to scale (but not scale) SWF files using SWFLoader. I want the loaded SWF to scale up to the size of the SWFLoader component, but at the same time I don't want the content to scale up and get distorted. Normally using actionscript one would assign a listener to the stage to monitor and adjust the size and scale, which works fine, except that there is no "stage" to monitor with the SWFLoader. How can I monitor the size of the SWFLoader inside the SWF file so things scale up without distorting? Thanks.
flexy
05-14-2007, 05:36 PM
I'm having a tough time figuring out how to scale (but not scale) SWF files using SWFLoader
:confused:
I think you'd need to override the SWFLoader class to stop it automatically scaling the SWF when it's forced to redraw/measure itself.
Could be wrong, but I'm sure it's going to be scripted under the assumption that if you want to scale it, you'd want to scale what's inside it too.
forcemorph
05-14-2007, 05:48 PM
I figured out a workaround... made a function in the SWF to resize its contents, and whenever the SWFLoader itself is resized, it calls that function with the SWFLoader's new dimensions. So the SWF can't do it by itself, it has to rely upon the SWFLoader component and actionscript in Flex.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.