IE9 preloader freezes (testcase+fix)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
jeash |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
Preloading 20+ images fails in IE9. See attached FlashDevelop project to reproduce.
While debugging, I've found that for some images the "load" event isn't firing. The preloader is then stuck and the application doesn't start. The images do load if you look at the Network tab in the IE9 debugger.
I've also found two strange fixes. Both are slight changes to the method BitmapData.
- If you add the line "if (image.complete) {}" (or any statement that reads the 'complete' property of the image object) at the very end of the method, that fixes the problem.
- OR, if you use "image.onload = ..." instead of "image.
Why the problem happens, or why these changes fix it, I have no idea. Probably just IE being IE. :-)
Here's a patch for the first suggested fix.