Thanks, Aran. I am still having issues so tried another method after reading on the documentation. However, I am still having an issue getting my url variable into the swf. I am pretty sure I did that javascript wrong (I am not as familiar with that part). As it is now does not work in Firefox or Explorer. I have spent so much time with this and still have not gotten to work. I am a designer trying to do a programmers job. Anyone with insight it would be appreciated.
<!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>Products</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 = getQueryParamValue("hpBagSelected"); swfobject.embedSWF("ProductSlide.swf", "flashcontent", "726", "331", "9.0.0", "expressInstall.swf", flashvars); </script> </head> <body bgcolor="#f9f5e0"> <div id="flashcontent" align="center"> <p>Alternative content</p> </div> </body> </html> On Mar 5, 11:56 pm, "Aran Rhee" <[email protected]> wrote: > Ok, so first of all, you need to get rid of the object/embed definition of > the same flash file in the flashcontent div. This is supposed to be used for > alternative content for people who don't have Flash. > > It is easy to test if the variable is being read correctly. Just test with > an alert statement: > > <script type="text/javascript"> > var so = new SWFObject("ProductSlide.swf", "ProductSlide", "726", "331", > "8", "#f9f5e0"); > alert("selected: " + getQueryParamValue ("hpBagSelected")); > so.addVariable("hpBagSelected", getQueryParamValue ("hpBagSelected")); > so.write("flashcontent"); > </script> > > If the alert shows the expected value of "Pizza", then you know you are > grabbing it correctly and should be available in your swf. > > Aran > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > > Behalf Of PixelPhysician > Sent: Friday, 6 March 2009 2:46 PM > To: SWFObject > Subject: Can't read a url variable from flash > > I am having difficulties transferring a variable from a flash file on > one page to a flash file on another page...I am passing the variable > through the url. > > http://www.example.com/ProductSlide.html?hpBagSelected=Pizza > > The issue is present in both Firefox and IE. Here's what I have on the > html page, and the swfobject.js file is in the same directory. I would > appreciate any input - I am new to swfobject and any input would be > greatly appreciated. > > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> > <head> > <meta http-equiv="Content-Type" content="text/html; > charset=iso-8859-1" /> > <title>Products</title> > > <script type="text/javascript" src="swfobject.js"></script> > > <div id="flashcontent" align="center"> > <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" > codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/ > swflash.cab#version=9,0,0,0" width="726" height="331" > id="ProductSlide" align="middle"> > <param name="allowScriptAccess" value="sameDomain" /> > <param name="allowFullScreen" value="false" /> > <param name="movie" value="ProductSlide.swf" /><param name="quality" > value="high" /><param name="bgcolor" value="#f9f5e0" /> <embed > src="ProductSlide.swf" quality="high" bgcolor="#f9f5e0" width="726" > height="331" name="ProductSlide" align="middle" > allowScriptAccess="sameDomain" allowFullScreen="false" > type="application/x-shockwave-flash" > pluginspage="http://www.macromedia.com/go/getflashplayer" /> > </object> > </div> > > <script type="text/javascript"> > var so = new SWFObject("ProductSlide.swf", "ProductSlide", "726", > "331", "8", "#f9f5e0"); > so.addVariable("hpBagSelected", getQueryParamValue > ("hpBagSelected")); > so.write("flashcontent"); > </script> > > </head> > > <body bgcolor="#f9f5e0"> > > </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] For more options, visit this group at http://groups.google.com/group/swfobject?hl=en -~----------~----~----~----~------~----~------~--~---
