Solved

How I can add swfobject in two instances?

Posted on 2010-08-16
3
322 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Suggested Courses

632 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