We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29181
    • 480 Posts
    This is an auto-generated support/comment thread for swfFix.

    Use this forum to post any comments about this addition or any questions you have regarding its use.

    Brief Description:
    This snippet uses SWFfix to embed flash (swf) content into a webpage.

    SWFfix is a joint effort from the authors of SWFobject and UFO. THE choices for embedding Adobe Flash.

    It still requires some testing and hopefully the bugs can be ironed out.
      Adrian Lawley: www.adrianlawley.com
      • 7455
      • 2,204 Posts
      it works nice but in ie I can not get transparency working. my original code was this:
      <script language="JavaScript" type="text/javascript">
      <!-- 
      var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
      if(hasRightVersion) {  // if we've detected an acceptable version
          var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
          + 'width="639" height="250"'
          + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
          + '<param name="movie" value="gfx/basic/textscroller.swf" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#000000" />'
          + '<embed src="gfx/basic/textscroller.swf" loop="false" menu="false" quality="best" wmode="transparent" bgcolor="#000000" '
          + 'width="639" height="250" name="Opzet" align="middle"'
          + 'play="true"'
          + 'loop="false"'
          + 'quality="high"'
          + 'allowScriptAccess="sameDomain"'
          + 'type="application/x-shockwave-flash"'
          + 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
          + '<\/embed>'
          + '<\/object>';
          document.write(oeTags);   // embed the flash movie
        } else {  // De geinstalleerde flash-plugin is te oud of niet detecteerbaar
          var alternateContent = 'Alternate HTML content should be placed here.'
        	+ 'Deze illustratie vereist een flash-plugin.'
         	+ '<a href=http://www.macromedia.com/go/getflash/>download de Flash-plugin</a>';
          document.write(alternateContent);  // insert non-flash content
        }
      // -->
      </script>
      


      now i used the standart version like this:

      snippetcall:
      [[swfFix?&embedType=`standard`&id=`myId`&version=`9.0.0`&expressInstall=`true`]]
      


      the code in the template:
      <object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="639" height="250" loop="false" menu="false" quality="best" wmode="transparent" bgcolor="#000000">
      <param name="movie" value="gfx/basic/textscroller.swf" />
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="gfx/basic/textscroller.swf" width="639" height="250" loop="false" menu="false" quality="best" wmode="transparent" bgcolor="#000000" >
      <!--<![endif]-->
      <p>Alternative content</p>
      <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
      </object>
      


      in ff it works fine nice transparency but in ie not.

      do I mis something?
        follow me on twitter: @dimmy01
        • 29181
        • 480 Posts
        Hey Dimmy, your markup is missing a param setting.

        To sum up, IE uses the outer object, all the proper browsers use the inner object. To that end you need to replace

        <param name="movie" value="gfx/basic/textscroller.swf" />


        with

        <param name="movie" value="gfx/basic/textscroller.swf" />
        <param name="wmode" value="transparent"/>


        ...if I remember rightly.

        Cheers,
        Taff
          Adrian Lawley: www.adrianlawley.com
          • 7455
          • 2,204 Posts
          Nice that worked like a charm thank you
            follow me on twitter: @dimmy01
            • 19257
            • 141 Posts
            how do I get flash content on my site with this snippet? I’m still fuzzy on the instructions, I’ve already uploaded the folder to assets/snippets and made the snippet with the swfFix.snippet.txt copied onto it. I’m pretty sure I got the instructions ok, I just have no idea where to put the call and if I need to place the <object> tag right above the snippet call or below or in a chunk? Help please!
              • 19257
              • 141 Posts
              oh and I’m trying to follow web standards so I’m not sure if I want to do it in a dynamic way...
                • 29181
                • 480 Posts
                Hey Miami,
                I built this snippet an awfully long time ago, and had to read the documentation myself. Once you have downloaded it, you should find everything you need to install it in swfFix.snippet.txt.
                This snippet basically just creates the JS you need to use swfFix according to: http://code.google.com/p/swffix/wiki/SWFFix_documentation

                if you have a normal object call along the lines of:
                <head>
                [[swfFix?&embedType=`standard`&id=`myId`&height=`200`&width=`800`&swfUrl=`assets/flash/myFlashFile` &version=`9.0.0`&expressInstall=`true`]]
                </head>
                 <body>
                 <div>
                <object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="780" height="420">
                	<param name="movie" value="myContent.swf" />
                	<!--[if !IE]>-->
                	<object type="application/x-shockwave-flash" data="myContent.swf" width="780" height="420">
                	<!--<![endif]-->
                		<p>Alternative content</p>
                	<!--[if !IE]>-->
                </object>
                <!--<![endif]-->
                </object>
                </div>
                </body>


                I normally replace the flash with an image nowadays, so if they don’t have javascript enabled they arent getting the flash either.
                <head>
                <script type="text/javascript" src="assets/js/swffix.js"></script>
                <script type="text/javascript">
                		SWFFix.embedSWF("assets/flash/landscape.swf", "banner", "995", "112", "9.0.0", "assets/flash/expressInstall.swf");
                </script>
                </head>
                <body>
                <div id="banner"><img src="assets/templates/images/banner.jpg" width="995" height="112" alt="Welcome to my site">
                </body>




                Hope that clears it up. Feel free to post any other questions you may have, I’ll answer them if I can.

                Taff



                  Adrian Lawley: www.adrianlawley.com
                  • 19257
                  • 141 Posts
                  shocked WHOA, awesome taff! Thanks alot for the response, I really like the idea of replacing the flash with an image. Don’t you feel that most people nowadays have JavaScript enabled and flash installed though?
                    • 7231
                    • 4,205 Posts
                    Don’t you feel that most people nowadays have JavaScript enabled and flash installed though?
                    I think that most modern browsers come with the flash plug-in pre-installed. However there may still be some users who chose not to use it or occasional users with old browsers. Also it does not work with screen readers so you can have an image with a nice description in the alt tag to help in these cases (which may also help with SEO as well).
                      [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                      Something is happening here, but you don&#39;t know what it is.
                      Do you, Mr. Jones? - [bob dylan]
                      • 29181
                      • 480 Posts
                      What dev_cw said pretty much sums up my thoughts too. Just about everybody has the Flash plugin installed in their browser, the question is what version, also with numerous different ways to connect to the internet nowadays, I’ll stand by the idea of using an image.
                      Also, an image tag is a lot easier to build than all that nested object embed stuff which I never really liked. Calling an image a certain name, and giving it an alt tag can certainly improve search engine rankings (as dev_cw said).

                      All the best,
                      Taff
                        Adrian Lawley: www.adrianlawley.com