Yes, presuming that you are intent on using the same flashvars, params, and attributes for both presentations.
At this point, I would suggest just trying it. You'll probably be able to test it for yourself faster than any well-meaning timely response. :) Vincent On Tue, Sep 7, 2010 at 2:26 PM, [email protected] < [email protected]> wrote: > Vincent, thanks for the response. Let me see if I understand > two unique id for the divs, fine. > on the script, as follows, for example > swfobject.embedSWF("untitled.swf", "myAlternativeContent", "800", > "600", "9.0.0", false, flashvars, params, attributes); > swfobject.embedSWF("untitled2.swf", "myAlternativeContent2", "800", > "600", "9.0.0", false, flashvars, params, attributes); > Is this correct two lines of swfobject? > thanks > Carlos > > On Sep 7, 12:53 pm, Vincent Polite <[email protected]> > wrote: > > Just add another div with a different id, and then repeat the call in > your > > script statement where you are calling swfobject.embedSWF > > for untitled.swf you'd replace this with your 2nd .swf file, and for > > myAlternativeContent, you'd replace that with your new div. > > > > You can repeat this process as much as your client's processor will > handle > > multiple flash embeds. > > > > In the event that HTML is a foreign language to you, you'll notice > various > > tags spread throughout the page. Ultimately they break down to this. > > > > <html> > > <head></head> > > <body></body> > > </html> > > > > Inside your <body></body> tags, you can add <div></div> references. Give > > each div a unique ID, and you can refer to those divs using the > javascript > > code... > > > > <script type="text/javascript"> > > swfobject.embedSWF(<path to swf file>, <id of div where you want the > swf > > file to show/embed>, <width in pixels>, <height in pixels>, <flash > version > > number>, <flashvars>, <params>, <attributes>); > > </script> > > > > Hopefully that makes enough sense for you to take it from there. If not, > I > > would try taking a look at the very hip documentation and examples posted > > at: > > > > http://code.google.com/p/swfobject/wiki/documentation > > > > Enjoy, > > > > Vincent > > > > On Tue, Sep 7, 2010 at 12:43 PM, [email protected] < > > > > > > > > [email protected]> wrote: > > > Hello, > > > Does anybody know the code for embedding two divs on the same page? > > > if this is the code for one .. do you use swfobject.embedswf twice? > > > Thank you in advance > > > Carlos > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// > > >www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > > > <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> > > > <head> > > > <title></title> > > > <meta http-equiv="Content-Type" content="text/html; > > > charset=iso-8859-1" /> > > > <script type="text/javascript" > src="swfobject.js"></script> > > > <script type="text/javascript"> > > > var flashvars = {}; > > > var params = {}; > > > var attributes = {}; > > > swfobject.embedSWF("untitled.swf", > > > "myAlternativeContent", "800", > > > "600", "9.0.0", false, flashvars, params, attributes); > > > </script> > > > </head> > > > <body> > > > <div id="myAlternativeContent"> > > > <a href="http://www.adobe.com/go/getflashplayer > "> > > > <img src=" > > >http://www.adobe.com/images/shared/download_buttons/ > > > get_flash_player.gif< > http://www.adobe.com/images/shared/download_buttons/%0Aget_flash_play...>" > > > alt="Get Adobe Flash player" /> > > > </a> > > > </div> > > > </body> > > > </html> > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "SWFObject" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<swfobject%[email protected]> > <swfobject%2bunsubscr...@googlegroups .com> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/swfobject?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "SWFObject" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<swfobject%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/swfobject?hl=en. > > -- You received this message because you are subscribed to the Google Groups "SWFObject" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/swfobject?hl=en.
