Not signed in (Sign In)

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorSkin
    • CommentTimeJan 3rd 2007 edited
     
    Hi to all the forum,

    I'm doing some tests because I'd like to use swfobject and a javascript which resolve IE 6.0 problems with png 24 bit images with alpha blending, I think it is time to use this format.

    The script wouldn't work with swfobject.

    here is the little script:

    [code]

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

    if ((version >= 5.5) && (document.body.filters))
    {
    for(var i=0; i {
    var img = document.images[i]
    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
    }
    }
    }

    [/code]

    And here a link to the home page of this script:
    http://homepage.ntlworld.com/bobosola/pnghowto.htm

    For an example I've just uploaded two html pages:

    the first is a test of the little javascript on a simple html page, without swfobject; if you use explorer 5.5 or 6.0 you'll see that it works and png with alfablending are displayed in a correct way;

    in the second example I used swfobject, and I.E. 5.5/6.0 won't render png images correctly.


    1. http://www.pointnet.it/PNGFix/Test.html
    2. http://www.pointnet.it/PNGFix/swfobject.html


    Thanks for you support
    Alessio Pellegrini'>
    • CommentAuthorkamermans
    • CommentTimeJan 3rd 2007
     
    Strange. Try moving all your SWFObject code (not the container DIVs) under your PNGs: example. This is not a fix, but a workaround - also, for what it's worth, it's the "write()" method that causes the PNG fix to fail - I may have some time to look at it in the morning.
    • CommentAuthorSkin
    • CommentTimeJan 6th 2007
     
    Thanks for your reply,
    I'll do some tests, but I'm trying to integrate swfobject in a CMS, and some swf flash movies are In different templates and in the header of the theme, which is separated from the content, I'm not shure it will be possible to move SWFObject code under PNGs.

    Thanks for your reply
    Alessio
    • CommentAuthorslackero
    • CommentTimeJan 9th 2007 edited
     
    there is a simple solution "setTimeout()". Wrap your SWFObject Call in a function - see sample.

    function doSWFObjectTimeout() {
    var so = new SWFObject(...);
    so.addParam("quality", "high");
    so.write("ID");
    }
    window.setTimeout("doSWFObjectTimeout()", 4000);

    Can be enhanced for IE check...
    • CommentAuthorSkin
    • CommentTimeJan 9th 2007
     
    I tried and works, but I have some bad effects: for example my header in flash loads after some seconds and I see the alternate contents; when loaded all the contet drop down of abouth 150 px ( my header height).

    If I put lower timeout times my flash movies loads faster and png fix works, but I have a very ugly effects because for a fraction I see alternate contents and so navigate on the site becomes annoying.

    Thanks for your reply.
    • CommentAuthorSkin
    • CommentTimeJan 9th 2007
     
    What will happen if I reduce very much the Timeout?
    Should I have some bad effects?

    With a very low timeout and with alternate contents of the same heights and backgrounds of my flash movies, al lot of the bad effect I described disappears.