Skip to content Skip to sidebar Skip to footer

Flash Website Bug With Firefox And Ie9 (but Works On Ie6 !)

my website does not work on firefox (firefox 4 or 7), nothing appears, even not the alternative content and with IE9, the problem is the content is compacted at the top of the pag

Solution 1:

Since you are using swfObject why are you not using it to do your actual embedding You will find the following code example to be much more browser compliant.

<scripttype="text/javascript"src="swfobject.js"></script><scripttype="text/javascript">functionloaded() {
    var flashvars={}, params={}, attributes={}, tmp, version, width, height, container, flashObj;

    flashvars.UserId = "23061";

    params.menu = "true";
    params.quality = "high";
    params.bgcolor = "#869ca7";
    params.allowscriptaccess = "always";
    params.allownetworking = "all";

    attributes.id = "myId";
    attributes.name = "myId";
    attributes.align = "middle";
    attributes.allowscriptaccess = "always";
    attributes.allownetworking = "all";

    tmp = "expressInstall.swf";
    version = "9.0.115";
    width = "100%";
    height = "100%";
    container = "replaceMe";
    flashObj = "myId.swf";

    swfobject.embedSWF(flashObj, container, width, height, version, tmp, flashvars, params, attributes);
  }

</script><bodyonLoad="loaded()" ><divid="replaceMe">Loading content.</div></body>

[EDIT] Try this out

<style>html, body{
  width:100%;
  height:100%;
  margin:0;
  background:white;
  overflow:hidden;
}
</style>

Solution 2:

I had this same problem recently, I had set the height and width to 100% and firefox would not display IE9 would squish the swf to the top of the page height:100px or something. I fixed it with JavaScript, actually jQuery (simply because it was available):

Essentially FF doesn't like % values when you size things, and IE9 has a different problem. If you added static values you wouldn't have a problem. But we don't want static values do we?

Anyways, I solved my issue by telling the JavaScript to write the Flash tag for me and insert static values based on the screen size.

<scripttype="text/javascript">
    document.write('<objectclassid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"width="' + $(window).width() + '"height="' + Math.round(($(window).width()*11)/24) + '"id="YourMovieID"align="middle"><paramname="movie"value="YourMovie.swf"/><paramname="wmode"value="opaque" /><paramname="scale"value="exactfit" /><!--[if !IE]>--><objecttype="application/x-shockwave-flash"data="YourMovie.swf"width="' + $(window).width() + '"height="' + Math.round(($(window).width()*11)/24) + '" ><paramname="movie"value="YourMovie.swf"/><paramname="wmode"value="opaque" /><paramname="scale"value="exactfit" /><!--<![endif]--><!--[if !IE]>--></object><!--<![endif]--></object>')
    </script>

I used $(window).width() to get the width of the screen and then Math.round(($(window).width()*11)/24) because the proportions of my movie were 24X11.

Again this was my jQ solution because it was available, you could use screen.width to get it. You might have to condense everything to one line though I just spaced it so you could see what's going on.

Post a Comment for "Flash Website Bug With Firefox And Ie9 (but Works On Ie6 !)"