8 Replies Latest reply on May 8, 2006 1:44 PM by Newsgroup_User

    Flash script not working in Netscape

    bobalee
      The problem started with the .swf not playing automatically in IE, and having to click on the Flash to "activate" it.

      So I followed the steps of advice from the adobe site:

      http://www.adobe.com/devnet/activecontent/articles/devletter.html

      This fixed the problem for IE on a PC, and it also works fine in Safari on my Mac.

      However, now there seems to be a lock-up in Netscape on my PC and Mac.

      Please take a look at my code and let me know what I'm doing wrong:

      http://www.spiritualmobile.com

      (there should be 2 Flash elements showing...a banner with a cell phone and some music notes coming from it, and below that a banner with the featured artist showing, and if you mouse over that one a song clip should play)

      Again, this works in IE on a PC and also in Safari on a Mac, but not in Netscape on Mac or PC.

      Thanks!
        • 1. Re: Flash script not working in Netscape
          Level 7


          > http://www.spiritualmobile.com

          are you using includes/SSI in that page?

          there are five <body> tags, five <head> sections, and five sets of styles
          sprinkled down through the page.

          Includes should not be complete html documents- they should only contain the
          correct html for where they are inserted.

          such as what i'm guessing is a footer navigation-
          the included files should only have from the <table with the footer links
          and the <div align="center" class="copyright">&copy;2006 Spiritual Mobile.
          All rights reserved.</div> in it. All else removed. Erase from <body up and
          from </body> down.

          on the flash not playing in netscape- as a guess- it's because it's only
          contained in an <object> tag, there's no <embed> set of tags.

          • 2. Re: Flash script not working in Netscape
            bobalee Level 1
            The original coder put some scripting inside each separate .php file that the home page is calling for. For example, look at the source for that footer you were mentioning:

            http://www.spiritualmobile.com/NewUsers/bottomnav.php


            As for the Flash not working in Netscape....there are no <object> or <embed> tags because it is just calling for the Flash using the script:

            <script type="text/javascript">Runmusicnotes();</script>

            I can't find any reason at all why it will not work in Netscape, but works fine in IE and Safari.
            • 3. Re: Flash script not working in Netscape
              Level 7


              > The original coder put some scripting inside each separate .php file that the
              > home page is calling for. For example, look at the source for that footer you
              > were mentioning:
              >
              > http://www.spiritualmobile.com/NewUsers/bottomnav.php

              I can't see the php of course-
              But even if there is some php in 4 include files doing something, there is
              no need to have each of them output a complete html document inside of the
              main html document.

              really- there are 5 <body> tags in the page. If that doesn't cause an issue
              with you, the conversation is pretty much over.


              >
              >
              > As for the Flash not working in Netscape....there are no <object> or <embed>
              > tags because it is just calling for the Flash using the script:
              >
              > <script type="text/javascript">Runmusicnotes();</script>
              >
              > I can't find any reason at all why it will not work in Netscape, but works
              > fine in IE and Safari.

              And here is that script:
              http://www.spiritualmobile.com/NewUsers/scripts/musicnotes.js

              and it's contents:
              function Runmusicnotes()
              {
              document.write('<object
              classid="clsid 27CDB6E-AE6D-11cf-96B8-444553540000"
              codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
              b#version=6,0,29,0" width="623" height="126">\n');

              document.write('<param name="movie" value="musicnotes.swf" />\n');

              document.write('<param name="quality" value="high" />\n');

              document.write('</object>\n');
              }

              put <embed> tags in there, and the other browsers will show the .swf, IF the
              user has JavaScript enabled.


              ignore my comments if you want.

              • 4. Re: Flash script not working in Netscape
                bobalee Level 1
                Your commenrs are helpful Alan.

                I'm not sure where to insert the <embed> tags however. Can you be more specific?

                Thanks for your help!
                • 5. Re: Flash script not working in Netscape
                  Level 7
                  as a guess- this:

                  function Runmusicnotes()
                  {
                  document.write('<object
                  classid="clsid 27CDB6E-AE6D-11cf-96B8-444553540000"
                  codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
                  b#version=6,0,29,0" width="623" height="126">\n');

                  document.write('<param name="movie" value="musicnotes.swf" />\n');

                  document.write('<param name="quality" value="high" />\n');

                  document.write('<embed src="musicnotes.swf"" quality="high"
                  pluginspage=" http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
                  Version=ShockwaveFlash" type="application/x-shockwave-flash" width="623"
                  height="126"></embed>\n');
                  document.write('</object>\n');
                  }


                  but it would be easier if you used a generic script and passed the path to
                  the .swf in a javascript function in the page.

                  • 6. Re: Flash script not working in Netscape
                    bobalee Level 1
                    Thanks Alan. Your script fixed it and it works like a charm in Netscape now.
                    • 7. Flash script not working in Netscape
                      bobalee Level 1
                      As for the extra boddy and head tages, take a look at the code for the footer, for example. They have a script at the top for a pop-up browser window when you select the terms and policies buttons, so I'm not sure of the bext way to remove the body and head tags.

                      I know this is a mess...but I'm willing to do what it takes to clean it up. Here is the html code for the footer:

                      <head>
                      <style type="text/css">
                      <!--
                      body {
                      margin-left: 0px;
                      margin-top: 0px;
                      margin-right: 0px;
                      margin-bottom: 0px;
                      }
                      .copyright {
                      font-family: Verdana, Arial, Helvetica, sans-serif;
                      font-size: 9px;
                      }
                      -->
                      </style>
                      <script type="text/JavaScript">
                      <!--
                      function MM_openBrWindow(theURL,winName,features) { //v2.0
                      window.open(theURL,winName,features);
                      }
                      //-->
                      </script>
                      </head>
                      <body>
                      <table width="346" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                      <td width="60" height="15" align="right" valign="middle"><a href=" http://www.spiritualmobile.com/register/faq.php"><img src="images/faq.jpg" width="27" height="15" border="0" /></a></td>
                      <td width="4" height="15" align="center" valign="middle"><img src="images/footerline.gif" width="1" height="10" /></td>
                      <td width="87" height="15" align="center" valign="middle"><a href="termspopup.php"><img src="images/terms.jpg" width="81" height="15" border="0" onclick="MM_openBrWindow('termspopup.php','','')" /></a></td>
                      <td width="8" height="15" align="center" valign="middle"><img src="images/footerline.gif" width="1" height="10" /></td>
                      <td width="52" height="15" align="center" valign="middle"><a href=" http://www.spiritualmobile.com/customercare"><img src="images/contactus.jpg" width="52" height="15" border="0" /></a></td>
                      <td width="9" height="15" align="center" valign="middle"><img src="images/footerline.gif" width="1" height="10" /></td>
                      <td width="43" height="15" align="center" valign="middle"><a href=" http://www.spiritualmobile.com/NewUsers/aboutus.php"><img src="images/aboutus.jpg" width="43" height="15" border="0" /></a></td>
                      <td width="5" height="15" align="center" valign="middle"><img src="images/footerline.gif" width="1" height="10" /></td>
                      <td width="78" height="15" align="left" valign="middle"><a href="#"><img src="images/privacy.jpg" width="60" height="15" border="0" onclick="MM_openBrWindow(' http://www.spiritualmobile.com/NewUsers/policy.php','','width=750,height=600')" /></a></td>
                      </tr>
                      </table>
                      <div align="center" class="copyright">&copy;2006 Spiritual Mobile. All rights reserved.</div>
                      </body>
                      </html>

                      Any ideas?
                      • 8. Re: Flash script not working in Netscape
                        Level 7
                        any javascript functions used in the includes need to be put in the head
                        section of every page the include is used in. (or, put in an external.js
                        file that is linked in the head section of every page)

                        the css, i'd start over and sort it out.
                        I'd use an external.css file, linked in the head section of every page.
                        For the include files, i'd hook a "Design Time Stylesheet" to them, so you
                        can use the existing styles.

                        that way, you have one css file used on all pages, instead of a bunch of
                        repeated stuff with differing names in different files.