3 Replies Latest reply on Jul 26, 2010 12:19 PM by funkysoul

    Embed multiple swfs in the same page using SWFObject

    BetsyW. Level 1

      method. I have tried this and it doesn't seem to work. In the example below the movie on the right (boy in the hat) is embedded using this procedure

      but the two on the left (paws moving on order button and dog animation) had to be installed using Dreamweaver's swf installation methodology. and, consequently the dog animation does not show up in Explorer 8 and some other browsers.

       

      Can anyone help?

       

      http://www.coolgelncap.net/

       

      thank you very much

       

      elizabeth

        • 1. Re: Embed multiple swfs in the same page using SWFObject
          funkysoul Level 4

          Did you create multiple div's to hold the swf? then you need to use the SWFObject code multiple times not only once..  you need to attach the var so... code in every div and so.write() should be pointing to correct divlayer.

          • 2. Re: Embed multiple swfs in the same page using SWFObject
            BetsyW. Level 1

            Yes, that worked here is the code from my test page:

            THANK YOU VERY MUCH, ELIZABETH

            <script type=”text/javascript” src=”js/swfobject.js”></script> (in the head)

             

            <div id=”flashcontent”>
                This text is replaced by the Flash content.
            </div>

            <script type=”text/javascript”>
                var so = new SWFObject(“movies/orderbutton.swf”, “order button video”, “204”, “65”, “6”, “#242424”); 
                so.addParam(“quality”, “high”);
                so.addParam(“wmode”, “transparent”);
                so.write(“flashcontent”);
            </script>

             

            <div id=”flashcontent2”>
                This text is replaced by the Flash content.
            </div>

            <script type=”text/javascript”>
                var so = new SWFObject(“movies/dog.swf”, “dog video”, “200”, “300”, “6”, “#242424”); 

               so.addParam(“quality”, “high”);
                so.addParam(“wmode”, “transparent”);
                so.write(“flashcontent2”);
            </script>

             

            <div id=”flashcontent3”>
                This text is replaced by the Flash content.
            </div>

            <script type=”text/javascript”>
                var so = new SWFObject(“movies/capmovie.swf”, “cap video”, “311”, “396”, “6”, “#242424”); 
                so.addParam(“quality”, “high”);
                so.addParam(“wmode”, “transparent”);
                so.write(“flashcontent3”);
            </script>