# Flash Preloader problems with IE



## Schecter (Jun 7, 2012)

This is for anyone out there who is familiar with flash and ActionScript3.

Yea im still having problems getting Internet Explorer (IE9) to render the flash preloaders. Every other browser, firefox, chrome, ect., can do it just fine and without any issues, but for some reason IE just shows an empty place holder until the *.swf is fully loaded.

previously I used event listeners on the first frame in order to invoke the loader info from the stage, but that didnt work with IE9
With my newest flash submission, I used a more object oriented approach (since i had a DocumentClass() ). Therefore, I made a preloader class that was tied with a symbol on the first frame.
the DocumentClass() gets loaded first, FYI.

Heres the code i used

DocumentClass

```
package  {
    
    import flash.display.MovieClip;    
    import flash.net.navigateToURL;
    import flash.net.URLRequest;
    import flash.events.Event;
    
    public class DocumentClass extends MovieClip {
        //global variables here 
        
        public function DocumentClass() {
            //instantiation of global variables here 
            
            preloader.addEventListener(Event.COMPLETE, onPreloaderComplete);  /*adds "loading complete" listener*/
            preloader.setLoaderInfo(loaderInfo);  /*sets loader info information from the stage*/
        }
        
        /*function is evoked once the loading is complete*/
        private function onPreloaderComplete(e:Event):void  
        {  
            preloader.removeEventListener(Event.COMPLETE, onPreloaderComplete);  
            gotoAndStop(2); 
        }  
    }
    
}
```

Preloader class

```
package  {
    
    import flash.display.MovieClip;
    import flash.display.LoaderInfo;  
    import flash.events.Event;  
    import flash.events.ProgressEvent;  
    
    
    public class Preloader extends MovieClip {
        
        
        public function Preloader() {
            // constructor code
        }
        
        public function setLoaderInfo(ldrInf:LoaderInfo):void  
        {  
            ldrInf.addEventListener(ProgressEvent.PROGRESS, onProgress);  /*adds loading listener*/
            ldrInf.addEventListener(Event.COMPLETE, onComplete);  /*adds "loading complete" listener*/
        }  
  
        private function onProgress(e:ProgressEvent):void  
        {  
            var percent:int = Math.round(e.bytesLoaded / e.bytesTotal * 100);  
            progressBar.width = percent / 100 * progressArea.width;  
            percentageText.text = percent + "%";  
        }  
  
        private function onComplete(e:Event):void  
        {  
            dispatchEvent(e); /*used by the DocumentClass to fire the "completed loading" event*/ 
        }  
    }
    
}
```


The only way I can think to do this now, is to have a wrapper *.swf load a external *.swf into itself, but that mean i would need two submissions or host the original *.swf elsewhere.

Any ideas anyone?

BTW, this is the submission i am talking about: http://www.furaffinity.net/view/8112127/


----------



## ToeClaws (Jun 7, 2012)

This may be a statement of the obvious but... don't use IE.  It's a terrible browser, and as you've already said, it works in all the other browsers.  IE has never conformed to standards properly and now that it's no longer the most used browser, there's no need to cater to it any more.  Companies are beginning to skip support on it as well:

http://www.internetnews.com/blog/skerner/skip-internet-explorer-for-web-dev.-save-100000.html

Just seems like it'd save you a real headache.


----------



## Schecter (Jun 7, 2012)

I don't use IE, but I would like my submissions to be compatible across all browsers, because the fact is there still will be a good portion of people viewing my flash applets via IE.


----------



## Aden (Jun 7, 2012)

ToeClaws said:


> This may be a statement of the obvious but... don't use IE.  It's a terrible browser, and as you've already said, it works in all the other browsers.  IE has never conformed to standards properly and now that it's no longer the most used browser, there's no need to cater to it any more.  Companies are beginning to skip support on it as well:
> 
> http://www.internetnews.com/blog/skerner/skip-internet-explorer-for-web-dev.-save-100000.html
> 
> Just seems like it'd save you a real headache.





> "To save more than $100,000, 4ormat decided to skip Internet Explorer, opting to only allow users to access its service through Mozillaâ€™s Firefox and Google Chrome browsers," the article states.



What an awful example. You might (_might_) be able to get away with that if your audience is a statistical anomaly and is comprised almost entirely of users of those browsers, but this isn't something to look up to for the general case unless you're quite arrogant. Even if IE isn't the most-used browser anymore, people still use it. A lot of people.

Dropping IE6 or even IE7 support is acceptable and should be encouraged these days. Dropping IE support altogether is just lazy.

(this doesn't help OP at all)


----------



## ArielMT (Jun 7, 2012)

Two questions that might be relevant:

Are you using the same version of the Adobe Flash Player ActiveX for IE as the Adobe Flash Player Plug-in that Firefox, Opera, and Chrome are using?  They are two different applications, and they are updated separately if I'm not mistaken.

If your Flash applet is embedded in a Web page, is IE rendering it in quirks mode?  There should be a Compatibility View button right next to the refresh button if so; try using that.


----------



## ToeClaws (Jun 7, 2012)

Aden said:


> What an awful example. You might (_might_) be able to get away with that if your audience is a statistical anomaly and is comprised almost entirely of users of those browsers, but this isn't something to look up to for the general case unless you're quite arrogant. Even if IE isn't the most-used browser anymore, people still use it. A lot of people.
> 
> Dropping IE6 or even IE7 support is acceptable and should be encouraged these days. Dropping IE support altogether is just lazy.
> 
> (this doesn't help OP at all)



Sorry. :/


----------



## Aden (Jun 7, 2012)

ToeClaws said:


> Sorry. :/



Rar and such >:V

Didn't mean to come across as harsh to you, just to the company that's doing that. Apologies for the lack of clarity. Believe me, I know how frustrating IE is


----------



## Schecter (Jun 7, 2012)

ArielMT said:


> Two questions that might be relevant:
> 
> Are you using the same version of the Adobe Flash Player ActiveX for IE as the Adobe Flash Player Plug-in that Firefox, Opera, and Chrome are using?  They are two different applications, and they are updated separately if I'm not mistaken.
> 
> If your Flash applet is embedded in a Web page, is IE rendering it in quirks mode?  There should be a Compatibility View button right next to the refresh button if so; try using that.



its the same ActiveX and settings for all browsers i have, even IE.
And yea i do know a way around it with HTML, but with FA submissions i cant change that. The only thing i can do is modify the *.SWF itself.

Thanks for ur input though


----------



## ToeClaws (Jun 8, 2012)

Aden said:


> Rar and such >:V
> 
> Didn't mean to come across as harsh to you, just to the company that's doing that. Apologies for the lack of clarity. Believe me, I know how frustrating IE is



No worries (unless it were my company or something, heh).  Yeah, IE can be very frustrating - the biggest problem we tend to have with it at work is that major vendors seem to live in a fantasy world where they're about ten years behind current tech, so they want you to use IE 6 or 7 to access their management GUIs.  We have to keep Windows VMs around for such occasions. :/


----------



## Aden (Jun 8, 2012)

ToeClaws said:


> We have to keep Windows VMs around for such occasions. :/



saame

Thankfully my company officially stopped supporting IE6 a year ago, which cut about 25% of their site build overtime


----------

