Solved

How I can add swfobject in two instances?

Posted on 2010-08-16
3
316 Views
Last Modified: 2012-08-14
Hi Experts!

I'm trying to add 2 differents swf for differents positions, in a webpage with swfobject(http://code.google.com/p/swfobject/); but I fail.

My first element is:

            var flashvars    = {};
            flashvars.xml    = "http://www.xxx.com/resources/1/config_988x200.xml";
            flashvars.font   = "font.swf";
            var attributes   = {};
            attributes.wmode = "transparent";
            attributes.id    = "slider";
            swfobject.embedSWF("flash/cu3er.swf", "cu3er-container", "1000", "200", "9", "expressInstall.swf", flashvars, attributes);

If I adapt this code the changes take affect in the first object.

How I can to do it?

Thnx a lot!
0
Comment
Question by:javiermorquecho
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
sscotti earned 500 total points
ID: 33451157
Did you give them separate id's? ("cu3er-container" and something else).   Look at the source and see what renders on the page (if you have firefox you should be able to look at the generated source).
0
 

Author Comment

by:javiermorquecho
ID: 33455666
Hi sscotti!

I changed the Id and the objects related:

                                    var flashvars1    = {};
                                    flashvars1.xml    = "http://www.xxx.com/resources/1/config_710x284.xml";
                                    flashvars1.font   = "font.swf";
                                    var attributes1   = {};
                                    attributes1.wmode = "transparent";
                                    attributes1.id    = "slider";
                                    swfobject.embedSWF("flash/cu3er.swf", "cu3er-container1", "712", "284", "9", "expressInstall.swf", flashvars1, attributes1);

But I cannot see

Do you are another idea?

Thnx a loot!
0
 

Author Comment

by:javiermorquecho
ID: 33456693
You're right!

I failed no added the html part.

                        
                           
                               
                           

                        
Thnx a lot!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now