SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2009
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Html fullscreen Internet Explorer issue

    Hi guys,

    I posted a tread last week about a preloader to load and cache multiple files (swf) that are at different addresses before playing a flash page. Someone finally posted an answer, and the code is almost working perfectly. The way to make it work is by having an .html file, an .as file and a .swf loader file.

    But right now I have an issue with the html file. It's working perfectly in Safari and Firefox but not in Internet Explorer. In IE the swf appears really small in the window. Any ideas why ?

    The test address is; http://www.liferevolution.com/test2/

    Here's the code for the html;

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script src="swfobject.js" type="text/javascript"></script>

    <script type="text/javascript">

    var flashVars = {};
    flashVars.fileToLoad = "main1.swf"; //change here to same url wrote into the preloader array

    var params = {};
    params.scale = "true"; // exactfit, noscale, noborder
    params.allowfullscreen = "true";
    //params.salign = "center";
    params.allowScriptAccess = "sameDomain";
    params.quality = "high";
    params.menu = "false" ;
    params.bgcolor = "#000000" ;

    var attributes = {};
    //attributes.align = "center";
    attributes.id = "mbox";
    attributes.name = "mbox";

    var breite = "0";
    var hoehe = "0";
    var swfFile = "javaScriptCaller";
    var mainFlashApp = "myFlash";
    var flashVersion = "9.0.0.0";

    swfobject.embedSWF("preloaderExample.swf", "myFlash", "100%", "100%", "9.0.0.0","expressInstall.swf", flashVars,params,attributes);


    function fullScreen()
    {
    posHelper("100%","100%");
    posHelper2((breite-20) + "px",(hoehe-20) + "px");
    var ele = document.getElementById("flashPosition");
    ele.style.margin = 0;
    ele.style.top = 0;
    ele.style.left = 0;
    ele.style.width = "100%";
    ele.style.height = "100%";
    }
    function posHelper (b,h)
    {
    var ele = document.getElementById("flashSize");
    ele.style.width = b;
    ele.style.height = h;
    ele.style.overflow = "hidden";
    }
    function posHelper2(b,h)
    {
    var ele = document.getElementById("htmlContent");
    ele.style.position = "absolute";
    ele.style.top = "0px";
    ele.style.left = "0px";
    ele.style.margin = "10px";
    ele.style.width = b;
    ele.style.height = h;

    }
    function onLoadBody()
    {
    fullScreen();
    }
    </script>

    <style type="text/css">
    <!--
    html,body {
    padding: 0;
    margin: 0;
    height: 100%;
    width: 100%
    }

    #meinFlash {
    position: absolute;
    left: 0px;
    top: 0px;
    padding: 0px;
    margin: 0px;
    }

    #htmlContent {
    }

    -->
    </style>
    </head>

    <body onload="javascriptnLoadBody();" style="background-color:#000000;">
    <div id="flashPosition" style="background-color:#000000s; z-index:3;">


    <div id="flashSize" style="z-index: 2;">
    <div id="htmlContent" name="htmlContent" style="z-index: 2;"></div>

    <div id="myFlash" name="myFlash" style="z-index: 1;">
    <p>Alternativ f&uuml;r Flash</p>
    </div>


    </div>
    </div>

    <script type="text/javascript">
    var x = 0;
    </script>
    <noscript>
    <p>Javascript NoScript</p>
    </noscript>

    </body>
    </html>

    Thanks in advance !!!!

  2. #2
    SitePoint Enthusiast
    Join Date
    Jul 2009
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys, someone found the solution. (ele.style.width = b and (ele.style.height = h were creating a Javascript error. I just added a // comment before.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •