|
|
 |
RE: FN-FORUM: Transparent Images
date posted 13th January 2006 00:17
Andy,
The display of a png transparency does not work properly in IE. It's IE's
fault (as usual). Use this javascript within the of your page, to
'solve' the problem.
if (navigator.platform == "Win32" && navigator.appName == "Microsoft
Internet Explorer" && window.attachEvent)
{
document.writeln('img { visibility:hidden; }
');
window.attachEvent("onload", fnLoadPngs);
}
function fnLoadPngs()
{
var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
for (var i = document.images.length - 1, img = null; (img =
document.images[i]); i--)
{
if (itsAllGood && img.src.match(/\.png$/i) != null)
{
var src = img.src;
var div = document.createElement("DIV");
div.style.filter =
"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',
sizing='scale')"
div.style.width = img.width + "px";
div.style.height = img.height + "px";
img.replaceNode(div);
}
img.style.visibility = "visible";
}
}
Jomo
www.DynamicDeveloper.co.uk
>
> Hi,
> How do I export a PNG image from fireworks MX so that where the
> background is transparent it actually appears transparent. I've tried
> setting the Matte value to white or black and I then get bleed through
> from the background. Is it possible to do this successfully ?
>
> I need it to be compatible between IE and Firefox - the transparency is
> a simple on/off - doesn't need to be any more complicated than that.
>
>
> Cheers
> Andy
>
> --
|
 |
|