4 Replies Latest reply on May 25, 2006 7:00 PM by zupko

    Displaying a Static Image if Flash is Blocked?

    SRDKU
      I apologize for asking a question that probably has an obvious answer, but I haven't had much luck in finding a keyword for my searches on this topic.
      I want to make sure that a static graphic of some sort (probably jpg) will be displayed in a banner slot in case the client's browser is set to block Flash.
      Is there a section in the Adobe/Macromedia documentation that describes what to do when faced with this scenario?
      Thanks!
      Scott
        • 1. Displaying a Static Image if Flash is Blocked?
          zupko Level 1
          Download the flash detection kit from macromedia - sorry, adobe - you can find it here:

          http://www.adobe.com/products/flashplayer/download/detection_kit/

          Just look at their examples. They use JS to write the content at runtime. I personally like using div tags and change the display based on the detection results.
          • 2. Re: Displaying a Static Image if Flash is Blocked?
            SRDKU Level 1
            Thanks! That's just what I was looking for!
            • 3. Re: Displaying a Static Image if Flash is Blocked?
              flashfloozie Level 1
              could you post the code for changing the div tags that way?
              • 4. Re: Displaying a Static Image if Flash is Blocked?
                zupko Level 1
                Here is the general idea:


                //HEAD

                /*These are my detection scripts - i made some functions that i can simply import to my detection, and a function that returns
                a boolean on whether they have flash 8 or not - easily modified for other versions....*/

                <script language="vbscript" src="../js/vbdetect.vbs"></script>
                <script language="javascript" src="../js/jsdetect.js"></script>

                <style>
                .content{display:none;} //start off with everything hidden
                #container{width:225px;}
                </style>

                //BODY
                <div class="content" id="hasFlash">
                You have flash player 8!
                </div>
                <div class="content" id="hasInstall">

                Follow the instructions below to install flash player 8.<br />
                // Express Flash Install File Here

                </div>
                <div class="content" id="hasNothing">
                You have nothing! - Link to Macromedia for DL (or image)

                </div>

                <script language="javascript">
                <!--

                //hasFlash8 is a boolean set in my scripts above - just recode the file
                if(hasFlash8){
                document.getElementById("hasFlash").style.display = "block";
                //run
                }else if(hasProductInstall && !hasFlash8){
                //run express install
                document.getElementById("hasInstall").style.display = "block";

                }else{
                //doesn't have install
                document.getElementById("hasNothing").style.display = "block";

                }

                -->
                </script>




                You can write you own detection scripts easy enough to detect the flash version you want. This example includes for express install. Just take a look at the detection kit and modify the document.write() sections to set variables for detection.

                Hope this helped.

                ajz