# IE Flash fix scripts killing popular PNG fix script

**URL:** <https://forum.kirupa.com/t/ie-flash-fix-scripts-killing-popular-png-fix-script/204178>\
**Category:** flash\
**Created:** [October 17, 2006, 7:02pm UTC](https://forum.kirupa.com/t/ie-flash-fix-scripts-killing-popular-png-fix-script/204178 "2006-10-17T19:02:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sursum](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@sursum](https://forum.kirupa.com/u/sursum)\
**Post date:** [October 17, 2006, 7:02pm UTC](https://forum.kirupa.com/t/ie-flash-fix-scripts-killing-popular-png-fix-script/204178/1 "2006-10-17T19:02:51Z")

</div>

Hello, I’m hoping someone can help me with a workaround for this problem. I have a page that includes both Flash and PNGs. To maintain the transparency in the PNGs in IE, I’ve used the popular pngfix.js script shown below.

Problem is, when I try to use the suggested Flash IE fixes such as fixit.js and flashobject.js, those scripts kill the PNG fix script.

Does anyone have an idea how to make it possible for me to use this PNG fix script AND a Flash IE fix?

Thanks!

pngfix.js code =

```auto
/*
 
Correctly handle PNG transparency in Win IE 5.5 & 6.
http://homepage.ntlworld.com/bobosola. Updated 18-Jan-2006.

Use in <HEAD> with DEFER keyword wrapped in conditional comments:
<!--[if lt IE 7]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->

*/

var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

if ((version >= 5.5) && (document.body.filters)) 
{
   for(var i=0; i<document.images.length; i++)
   {
      var img = document.images*
      var imgName = img.src.toUpperCase()
      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
      {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText 
         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
         + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
         img.outerHTML = strNewHTML
         i = i-1
      }
   }
}

```

Flash fixit.js code =

```auto
theObjects = document.getElementsByTagName("object");
for (var i = 0; i < theObjects.length; i++) {
    theObjects*.outerHTML = theObjects*.outerHTML;
}

```

\*include to this is put immediately after closing object tag
