3 Replies Latest reply on Apr 5, 2010 7:07 AM by beno12345

    Browser Incompatibility

    beno12345

      Hi;

      How is it that my swf files are suffering from browser incompatibilities? How do I rectify the situation? I'm frankly surprised to encounter this issue, since I would have thought a swf file would be generated such that it wouldn't have these problems. Here are two examples;

       

      http://globalsolutionsgroup.vi/

       

      This works fine in Safari, but not in my Mac version of FF (latest of both). In the latter the swf files don't ever display. It works well in (I believe) IE 7 for Windoze but not in IE 8 for Windoze. In the latter it never goes to the index page from the preloader, and when I surf there directly, it doesn't display the swf that "covers" (then disappears from) the main template page, which also has a swf, and in the latter swf one of the graphics never loads.

       

      http://angrynates.com/perfection/

       

      This swf plays differently on all sorts of different browsers. On some, such as my Safari, it plays exactly as desired. In my FF, the hands momentarily disappear. In certain Windoze/IE configurations, it gets all screwed up and looks awful.

       

      What is going on inside the swf files that it displays so differently, and how do I counteract these problems?

      TIA,

      beno

        • 1. Re: Browser Incompatibility
          Ned Murphy Adobe Community Professional & MVP

          If these don't work in any browsers, then there's a chance the swf's are not properly designed.  USually browser incompatibilites stem from the embedding code that is used in the html page.  If you show that it may be determinable.

          • 2. Re: Browser Incompatibility
            Ankur Arora Level 1

            Hey Beno,

            As far as I know SWF is not the one which can generate a browser related issues because they run through a plug-in. However the way you are embeding that SWF could generate issues in different browsers. Can you post the code which you are using to embed SWF in to the HTML?

             

             



            Thanks & Regards
            Ankur Arora
            Project Leader(Flash and Flex)
            http://flashdeveloper.blogspot.com

             


            • 3. Re: Browser Incompatibility
              beno12345 Level 1

              These DO work in SOME browsers, as I wrote in my first post (please reference). Here is the embedded code for globalsolutionsgroup:

               

              index.html

               

              <html><head>
              <SCRIPT language="JavaScript">
              <!--
              window.location="preload.py?width=" + screen.width;
              //-->
              </SCRIPT>
              </head></html>

               

               

               

              preload.py

               

              // This is a cheat. It's not a real preloader. I use this to simply load my assets which are used in both swf files.

               

              #!/usr/bin/python

               

              import cgitb; cgitb.enable()
              import cgi
              import sys,os
              sys.path.append(os.getcwd())

               

              form = cgi.FieldStorage()
              width = form.getfirst('width','800')

               

              lines = '''#!/usr/bin/python

               

              return "%s"''' % width
              f = 'width.py'
              try:
                os.remove(f)
              except OSError:
                pass
              f = open(f, 'w')
              f.writelines(lines)
              f.close()
              os.chmod('width.py', 0755)
              print "Content-Type: text/html"
              print
              print '''
              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
              <head xmlns="http://www.w3.org/1999/xhtml">
              <meta http-equiv="REFRESH" content="0;url=index.py" />
              </head>
              </html>

               

               

               

              index.py

               

              // important only because it loads the template

               

              #!/usr/bin/python

              import string

              import cgitb; cgitb.enable()

              import cgi

              import sys,os

              sys.path.append(os.getcwd())

              from template import template

              ourFile = string.split(__file__, "/")

              page = ourFile[len(ourFile) - 1][:-3]

               

              template(page)

               

               

               

              template.py

               

              #!/usr/bin/python

               

              import cgitb; cgitb.enable()
              import cgi
              import sys,os
              sys.path.append(os.getcwd())
              import time
              from threading import Timer
              from width import width

               

              p = 'template'

               

              def template(page):
                w = int(width())
                wn = w/1024
                print "Content-Type: text/html"
                print
                print '''
              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
              <head xmlns="http://www.w3.org/1999/xhtml">
              <style type='text/css'>
              .splash { position:absolute; left:0px; top:0px; z-index:2 }
              .page { position:absolute; left:0px; top:0px; z-index:1 }
              .text {  font-family: Arial, Helvetica, sans-serif; font-size: 16px; text-decoration: none; text-align: justify}
              </style>
              <title>Global Solutions Group</title>
              <meta http-equiv="distribution" content="Global" />
              <meta http-equiv="robots" content="index all, follow all" />
              <meta name="author" content="This web site developed by beno. You may reach him at his web site [beno.vi], or by dialing 340-773-0687 and asking for room 102." />
              <script language="JavaScript" type="text/JavaScript">
              <!--
              function MM_preloadImages() { //v3.0
              var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
              var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
              if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
              }

               

              function MM_swapImgRestore() { //v3.0
              var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
              }

               

              function MM_findObj(n, d) { //v4.01
              var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
              d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
              if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
              for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
              if(!x && d.getElementById) x=d.getElementById(n); return x;
              }

               

              function MM_swapImage() { //v3.0
              var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
              if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
              }

               

              function rem() {
                  var t = document.getElementById('splash');
                  t.parentNode.removeChild(t);
              }
              //-->
              </script>
              </head>
              <body onload="setTimeout('rem()', 2000)" onload="MM_preloadImages('images/office-supplies-on.jpg','images/catalog-on.jpg','images/ customer-template-on.jpg','images/forms-on.jpg','images/about-on.jpg','images/contact-on.j pg')">'''

               

               

              NOTICE HERE THAT IF THE PAGE IS "index" THAT IT WILL LOAD THE SPLASH PAGE


                if page == 'index':
                  print '<div class="splash" id="splash">'
                  print '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" WIDTH="%s" HEIGHT="%s" id="myMovieName">' % (str(wn*1008), str(wn*785))
                  print '''
              <PARAM NAME=movie VALUE="globalSolutionsSplash.swf">
              <PARAM NAME=quality VALUE=high>
              <PARAM NAME=bgcolor VALUE=#FFFFFF>'''
                  print '<EMBED href="/support/flash/ts/documents/globalSolutionsSplash.swf" quality=high bgcolor=#FFFFFF WIDTH="%s" HEIGHT="%s" NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>' % (str(wn*1008), str(wn*785))
                  print '</OBJECT>'
                  print '</div>'

               

               

              NOTE HERE THAT IT WILL LOAD "page" IRRESPECTIVE OF WHETHER IT IS THE INDEX PAGE


                print '''<div class='page'>
              <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
              codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
              WIDTH="1008" HEIGHT="200" id="globaloilcounter_external1">
              <PARAM NAME=movie VALUE="GlobalSolutions.swf">
              <PARAM NAME=quality VALUE=high>
              <PARAM NAME=bgcolor VALUE=#FFFFFF>
              <EMBED href="GlobalSolutions.swf" quality=high bgcolor=#FFFFFF WIDTH="1008" HEIGHT="200" NAME="GlobalSolutions" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
              </OBJECT>
              </div>
              <script language="JavaScript1.2" src="quickmenu/sample_data.js"></script>
              <script language="JavaScript1.2" src="quickmenu/dqm_script.js"></script>'''

               

               

              The rest doesn't matter.

               

               

               

               

              Here is Perfection Jewelers:

               

               

              <html><head>
              <SCRIPT language="JavaScript">
              <!--
              window.location="preload.py?width=" + screen.width;
              //-->
              </SCRIPT>
              </head></html>

               

              #!/usr/bin/python

               

              import cgitb; cgitb.enable()
              import cgi
              import sys,os
              sys.path.append(os.getcwd())

               

              form = cgi.FieldStorage()
              width = form.getfirst('width','800')

               

              lines = '''#!/usr/bin/python

               

              def width():
                return "%s"

               

              if __name__ == '__main__':
                width
              ''' % width
              f = 'width.py'
              try:
                os.remove(f)
              except OSError:
                pass
              f = open(f, 'w')
              f.writelines(lines)
              f.close()
              os.chmod('width.py', 0755)
              print "Content-Type: text/html"
              print
              print '''
              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
              <head xmlns="http://www.w3.org/1999/xhtml">
              <meta http-equiv="REFRESH" content="0;url=preloader.swf" />
              </head>
              </html>
              '''

               

              So we see that all this code is doing is loading the preloader.swf directly and nothing else.

               

               

               

              If these don't work in any browsers, then there's a chance the swf's are  not properly designed.  USually browser incompatibilites stem from the  embedding code that is used in the html page.  If you show that it may  be determinable.