So you want to make sure that you only call embedSWF() for div elements that actually exist.
As you are using a serverside language, why don't you just rewrite the location of the correct single swf to embed, rather than creating 2 divs, and two embedSWF() calls on page B? Also, embedSWF() is executed as soon a the domready event is fired. I don't think you want all of your embedSWF() calls in the head file, as you only want certain files to be embedded on certain pages. Seems like you just need two pages, Page A and Page B (with no head page). Page A has a simple embedSWF(), and page B has the logic to determine the correct swf path. Aran On Tue, Sep 1, 2009 at 7:27 AM, danee987 <[email protected]> wrote: > > Hi guys I have a very simple setup. 3 swf files total, one swf on one > page only used to select a language (we'll call it page A). Then on a > second page I have a simple asp if else checking my language and > displaying the correct swf for the specified language (we'll call this > one page B) . I also have 1 file for the head tags and swfObject code > shared by these two pages(we'll call it HEAD page) . > > So I have firefox with an older version of the flash player setup on > it so I can test my upgrade option on the flash, and I have IE 7 with > the latest player in case I want to actually see my flash:) Now, in > Firefox if I go to page A, I am prompted to upgrade to latest flash > with no problem. So far so good. But now once I go to page B I do not > see anything at all. I am never prompted to upgrade and I do not see > the flash at all. If I test in IE everything works perfectly, no issue > at all anywhere. > > So, on the HEAD page, I am embedding the homepage flash first, then > the other 2 swf files with the two languages. If I REMOVE the homepage > embed and view page B in Firefox IT WORKS. So there is some kind of > strange conflict there going on with the code setup for the multiple > swfs. So let me show you my code on the HEAD page. It is very simple: > > <script type="text/javascript" language="javascript"><!-- #include > virtual="/swfobject/swfobject.js" --></script> > > <script type="text/javascript"> > > var flashvars = {}; > var params = {}; > params.wmode = 'transparent'; > var attributes = {}; > > swfobject.embedSWF("/_flash/flash_home.swf", "flashDiv", "995", "620", > "9.0.0", "/swfobject/expressInstall.swf",flashvars,params,attributes); > > var flashvars1 = {}; > var params1 = {}; > params1.wmode = 'transparent'; > var attributes1 = {}; > > swfobject.embedSWF("/_flash/flash_home_LANG1.swf", "flash_lang1", > "995", "620", "9.0.0", "/swfobject/ > expressInstall.swf",flashvars1,params1,attributes1); > > > var flashvars2 = {}; > var params2 = {}; > params2.wmode = 'transparent'; > var attributes2 = {}; > > swfobject.embedSWF("/_flash/flash_home_LANG2.swf", "flash_lang2", > "995", "620", "9.0.0", "/swfobject/ > expressInstall.swf",flashvars2,params2,attributes2); > > </script> > > And my code on the second page (FYI I am not pasting the entire > thing): > > > .....<td> > <% if Session("LangID") = 1 then %> > <div id="flash_lang1"></div> > <% else %> > <div id="flash_lang2"></div> > <% end if %> > </td>......... > > As you can see it is a very easy setup, yet it does not work. Has > anyone had this sort of problem before? What am I writing wrong?? Any > help would be greatly appreciated! > > Danny > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
