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

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

    Brief Description:
    Snippet of SWFObject.
    SWFObject is a small Javascript file used for embedding Macromedia Flash content.
      • 22303 MODX Staff
      • 10,725 Posts
      Very cool. Great contribution gyuco!

      BTW, I just integrated Flash into a site using an alternative js technique, called UFO (Unobtrusive Javascript Objects) which is available at http://www.bobbyvandersluis.com/ufo/. I was wondering if anyone has or knows of any comparisons done between SWFObject and UFO, i.e. which is better, or any known issues with either?
        • 23491 ☆ A M B ☆
        • 1,056 Posts
        Personally, I’m a UFO user myself... I thought (possibly in earlier versions?) SWFObject handled FlashVar declarations a bit differently, and I recall liking the general syntax of UFO a bit more, as well.

        Not quite sure of other differences/benefits, although I know the ufo.js is pretty small ~20kb...
          Mike Reid - www.pixelchutes.com
          MODx Ambassador / Contributor
          [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
          ________________________________
          Where every pixel matters.
          • 34162
          • 1 Posts
          I like this snippet, it’s much better then the code generated by Dreamweaver grin

          I need the background to be transparent, so I tried to use &bg=`transparent`. This gives a green background in IE6 embarrassed

          How can I get a transparent background? If this is not possible, I’ll have to try UFO instead.
            • 10449
            • 956 Posts
            Of course it’s possible. Just check out the documentation:
            http://blog.deconcept.com/swfobject/

            This will do the trick:
            so.addParam("wmode", "transparent");

            Just add that line to the snippet. You could also alter the snippet to only add this line to the output if a certain parameter is set (make it more dynamic).
              • 32319
              • 129 Posts
              Everyone interested in embedding flash may want to keep their eyes peeled here:

              http://www.swffix.org/devblog/

              It is a joint project between the authors of UFO and SWFObject to create an even better Flash embedding.

              And here is a good article on alistapart.com about SWFfix:

              http://www.alistapart.com/articles/flashembedcagematch/
                "Regret for the things we did can be tempered by time; it is regret for the things we did not do that is inconsolable."
                -- Sydney Harris
                • 23589
                • 4 Posts
                Does anyone know how to make TinyMCE to load Flash file into the content using SWFObject? I am quite new as MODx user and I know how to include SWFObject in my snippets, but maybe there is "a version" of TinyMCE plugin that would enable any content manager load swf files as SWFObjects just using the html editor?
                  • 24533
                  • 6 Posts
                  I’ve seen that cuervo-gold has expanded swfObject by a bunch of parameters for swf variables and parameters.

                  So I downloaded and tested and after I changed a view lines of code of the snippet it worked for me:

                  124	$swfvariable = substr("$value",0,strpos($value,':'));
                  125	$swfvalue = substr("$value",strpos($value,':')+1);
                  


                  137	$swfparameter = substr("$value",0,strpos($value,':'));
                  138	$swfvalue = substr("$value",strpos($value,':')+1);
                  


                  If one cannot see the difference - I changed the delimiter of the substr from ’=’ to ’:’
                  and added the ’+1’ at line 138.

                  I only tested the variables so far.

                  Feedback about different experiences is highly appreciated.
                    Greetz from Vienna, Austria EUROPE

                    RaVen
                    • 1535
                    • 84 Posts
                    Quote from: ganeshXL at Apr 07, 2007, 03:49 AM

                    This will do the trick:
                    so.addParam("wmode", "transparent");

                    Btw, in case anyone else is struggling with Flash content obscuring their drop down menues, this modification was the only way I could make sure that the Flash movie played in the back in all major browsers (works in IE6, IE7, Safari 2 and Firefox 2, not Opera 9).
                    z-index did not work for me at all with Flash.

                    Cheers,

                    Andreas
                      • 32450
                      • 2 Posts
                      Hi,
                      I just downloaded the SWFObject snippet and installed it on the local version of my site, where it worked fine. My Flash movie displayed and did everything it was supposed to do.

                      However I also have a production version of the same site, on a live server. I tried to create the snippet on the live site, just as I’d done it on the local version. When I tried to save the snippet, I got an odd error which I’ve never seen before, as follows:

                      "Precondition failed
                      The request was not completed due to preconditions that are set in the request header.

                      Preconditions prevent the requested method from being applied to a resource other than the one intended."

                      Once this is done, I’m locked out of the server for 5 - 10 mins. I can’t access the live site or the CMS Manager.
                      Has anyone seen this problem and found a solution?

                      I realise that I could manually copy the snippet code into a new record in MODx’s database, which is probably what I’ll end up doing, but if anyone can shed any light on what’s going on, I’d be really grateful.

                      Thanks,

                      Willo