Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How I can add swfobject in two instances?

Posted on 2010-08-16
3
Medium Priority
?
326 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 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

886 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