Title : A Solution for the IE ActiveX problem with the Loader Component
Topic : Macromedia Flash MX 2004 - Components
Author : Valeriu Dinulescu
Date : 01/17/2005

   

When a Loader component is used to show jpeg images, in IE the Loader "complete" event is triggered before the image is shown on the screen. That caused me a lot of problems when I wanted to use an image transition between two images in a slide show or when I wanted to center an image inside an area.

I found a trick to solve this problem by using a sort of preloader movie where I load the image before I load it with the Loader component. This solution increases a little bit the download time for the image but it works. It seems that if the image was already download by the browser our problem dissapears.

So I create a new component I called LoaderWrap that extends the Macromedia Loader component. This component has the same parameters, properties and methods as the Loader component and can be used in the same way. You can see the results in the two flash movies from the left where I create two small slideshows; one with LoaderWrap and the other with Loader component. On the "complete" event of the components the image is centered on the stage. You must browse this page in IE to see what the diferences are.

You can download here the LoaderWrap component and see if it works for you.

Please send me a message if you encountered any problems when using it.

Valeriu Dinulescu

 
 
Date: 10.04.2005

A few days ago I learned about another solution for the Loader component problem in Microsoft IE. I think it's a better solution than mine. It can be used easier and at doesn't seem to have the side effects of the LoaderWrap component that I was noticed about.
Here you can find out more and download the code:    http://www.bgxcomponents.com/flashLoaderScale.htm

If that solution proves to be better it means that the short ( but glorious ) life of my LoaderWrap component is close to the end.
I'm glad if it helped you. Good luck.
Valeriu Dinulescu
 
Date: 19.04.2005

How to install LoaderWrap on your computer (only if you don't know how):

You have to go in the area where your FlashMX2004 is installed, on your harddisk and find the folder named "Components".
( This is the path on my computer: C:\Program Files\Macromedia\Flash MX 2004\en\First Run\Components )
Create a new folder there and name it whatever you want ( I named it "Custom" but the name is not relevant )
Copy the LoaderWrap.swc file inside that folder.
( C:\Program Files\Macromedia\Flash MX 2004\en\First Run\Components\Custom\LoaderWrap.swc )
Then restart Flash. LoaderWrap component should appear in the Components panel. You can drag it on the stage the same way you do with the other components.

Valeriu Dinulescu