Not signed in (Sign In)

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

    • CommentAuthoruD
    • CommentTimeFeb 4th 2008
     
    My flash has this CSS

    body {
    MARGIN: 0px;
    OVERFLOW: hidden;
    }

    when the flash is not found my CSS/Html page needs to get rid of the overflow hidden value.

    Is there a way to have one style sheet for the flash and then if flash is not found discard that style sheet and import an other?

    Thank you.
    • CommentAuthorphilip
    • CommentTimeFeb 4th 2008
     
    you could apply a body class if the flash SWF is successfully embedded


    body {
    /* no need to set overflow */
    }

    body.flashed {
    overflow: hidden;
    }


    var so = new SWFObject(usual code here);
    if(so.write("flashcontent"){
    body.className = "flashed";
    }


    you could also apply styles directly to elements using javascript


    var so = new SWFObject(usual code here);
    if(so.write("flashcontent"){
    body.style.overflow = hidden;
    }


    - philip
    • CommentAuthoruD
    • CommentTimeFeb 5th 2008
     
    cool thanx! can't wait to start playing around with it all.
    • CommentAuthorphilip
    • CommentTimeFeb 5th 2008
     
    i made a small typo... forgot the quotes around "hidden" in the second example


    var so = new SWFObject(usual code here);
    if(so.write("flashcontent"){
    body.style.overflow = "hidden";
    }