ouyang789987 / swfobject

Automatically exported from code.google.com/p/swfobject
0 stars 0 forks source link

swf object - does flash version need to be included #634

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please see code below. I am using this code made by B Vandersluis as per a link 
that was originally on the swfobject website page. 
Where is says : if (swfobject.hasFlashPlayerVersion("6.0.0"))

I want to check do I need to update this to "11.0.00" as the flash player is 
now at version 11?? 
Does this limit the views as it is targetting a specific release of flash 
player only? Or would the page be viewable with any flash player. 
Thanks kindly for any advice offered on this matter. 
A. 

CODE COPY: 

<!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" lang="en" xml:lang="en">
    <head>
        <title>SWFObject 2 dynamic embed full browser flash incl. min-width, min-height and scrollbars</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <style type="text/css" media="screen">
            body { margin:0; padding:0; text-align:center; }
            #container { margin:20px auto; width:770px; text-align:left; }
        </style>    
        <script type="text/javascript" src="swfobject.js"></script>
        <script type="text/javascript">
        //<![CDATA[
        function getViewportSize() { 
            var size = [0, 0]; 
            if (typeof window.innerWidth != "undefined") { 
                size = [window.innerWidth, window.innerHeight];
            } 
            else if (typeof document.documentElement != "undefined" && typeof document.documentElement.clientWidth != "undefined" && document.documentElement.clientWidth != 0) {
                size = [document.documentElement.clientWidth, document.documentElement.clientHeight]; 
            }
            else {
                size = [document.getElementsByTagName("body")[0].clientWidth, document.getElementsByTagName("body")[0].clientHeight]; 
            }
            return size; 
        }
        function createFullBrowserFlash() {
            swfobject.createCSS("html", "height:100%;");
            swfobject.createCSS("body", "height:100%;");
            swfobject.createCSS("#container", "margin:0; width:100%; height:100%; min-width:770px; min-height:390px;");
            window.onresize = function() {
                var el = document.getElementById("container");
                var size = getViewportSize(); 
                el.style.width = size[0] < 770 ? "770px" : "100%";
                el.style.height = size[1] < 390 ? "390px" : "100%";
            };
            window.onresize();
        }   
        swfobject.embedSWF("test6.swf", "content", "100%", "100%", "6.0.0");
        if (swfobject.hasFlashPlayerVersion("6.0.0")) {
            swfobject.addDomLoadEvent(createFullBrowserFlash);
        }
        //]]>
        </script>
    </head>
    <body>
        <div id="container">
            <div id="content">
                <h1>Alternative content</h1>
                <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
            </div>
        </div>
    </body>
</html>

Original issue reported on code.google.com by Alayna.R...@gmail.com on 14 Jun 2012 at 2:39