For static publishing, use swfobject.getObjectById() -- that'll resolve which one you need to grab for scripting purposes.
Also, I'm pretty sure you can (and should) use the same ID for both, as swfobject (and the conditionals) take care of making sure only one is in the DOM eventually. --Kyle -------------------------------------------------- From: "FahadB" <[email protected]> Sent: Sunday, April 05, 2009 4:00 AM To: "SWFObject" <[email protected]> Subject: Passing a Var to the flash file using Object id doesnt work in FF > > Hi there > > I am using swfobject for calling up my flash files plus the alternate > content, I have one dynamic textbox in flash which acquires the > javascript generated value in it by using document.getelementbyid. > > Even if its IE or !IE i have to pass that variable to my flash, but as > we are using 2 Object tags with the conditions on IE and !IE, I cannot > pass the same id to both object tags, due to which its works well only > in IE but not getting the variable value in !IE example FF. > > Can anyone help on how to pass on the same variable value to !IE > versions, code below: > > <script type="text/javascript" src="swfobject.js"></script> > > <script type="text/javascript"> > swfobject.registerObject("Spotlight_en_gb", "8"); > > function CountryCode(){ > var tempObj2 = document.getElementById('Spotlight_en_gb'); > if(tempObj2) > { > tempObj2.SetVariable('ccode', 'KSA'); > } > > } > </script> > / head > > body: > > <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" > width="550" height="400" id="Spotlight_en_gb" wmode="transparent"> > <param name="movie" value="Vartest.swf?"/> > <param name="wmode" value="transparent" /> > <param name="menu" value="false" /> > <!--[if !IE]>--> > <object type="application/x-shockwave-flash" data="Vartest.swf?" > width="770" height="276" wmode="transparent"> > > <!--<![endif]--> > <!--Non Flash Content--> > Alternate Flash Content > <!--Non Flash Content End--> > <!--[if !IE]>--> > </object> > <!--<![endif]--> > </object> > <script type="text/javascript">CountryCode();</script> > / body > > > Please help.... > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
