Solved

How I can add swfobject in two instances?

Posted on 2010-08-16
3
317 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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 …
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
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 what frame rate is, how to control it and what effect it has on the video.

920 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

15 Experts available now in Live!

Get 1:1 Help Now