Flash loader component failing to scale down loaded pictures
Posted By wassim in FlashHi,
I’ve ran into this bug recently and tried to find a solution, a quick google search returned no answers to the issue so I thought I would post about the problem here and also post the solution / workaround I found.
The problem is that the loader component (flash 8 AS2) is not scaling down the loaded jpg (unless the latter are cached by the browser) despite the fact that I have set the scaleContent property of the component to true via the component inspector panel (and even tried to set it via actionScript code), so as soon as the picture is loaded, it displays or renders to the screen with its original dimensions, if you refresh the page, it will scale down correctly.
Just a side note here, this has happened while I was using multiple instance of the loader component each loading a different jpg having a unique contentPath.
The solution I found is simply to preload the pictures I intend to use first using the MovieClipLoader class and then to set the contentPath property of the instances AFTER the images have been fully loaded (and thus cached by the browser). This solution works.
PS: you’ll have to test online to reproduce this since flash loads local content differently.


May 16th, 2008 at 7:34 pm
Thank you for the post. I have been having the identical problem with one of my flash apps and needed help on this. I have tried your suggested work-around but keep running into problems. I’m sure it has to do with my implementation. Do you have a coding example for this? If needed, I can send an example to you of what I tried.
Thanks,
-Matt.
May 17th, 2008 at 12:37 pm
Hello,
I’ve found a fixed version of the loader component and been using it ever since, it’s called IELoader by Jeff Tapper and I would highly recommend using it instead of trying the hack I suggeseted.
Here’s a direct link:
http://jeff.mxdj.com/loader_component_and_internet_explorer.htm
Hope this helps.
May 21st, 2008 at 7:24 pm
Thank you Wassim. Excellent recommendation.
July 6th, 2009 at 5:58 pm
How soon will you update your blog? I’m interested in reading some more information on this issue.