Hello all, I am currently embedding a flash file using: <PARAM NAME=FlashVars VALUE="xmlfile1=ir_locator_3.php?County=<?php echo $_GET['County']; ?>"> <embed src="ir_locator.swf?xmlfile1=ir_locator_3.php&County=<?php echo $_GET['County']; ?>" menu="false" quality="high" bgcolor="#ffffff" width="250" height="350" name="ir_locator_demo" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
I am now tring to do this with SWFObject, but cant get the County variable to work. here is the code i'm using: <script type="text/javascript"> var so = new SWFObject("ir_locator.swf", "ir_locator_demo", "250", "350", "8", "#ffffff"); so.addVariable("xmlfile1", "ir_locator_3.php"); <?php foreach($_GET as $variable => $value) { echo "so.addVariable('$variable', '$value');"; } ?> so.write("flashcontent"); </script>
What I am trying to do is have the county selected highlighed, you can see both maps on http://irish-property.ie The top one is SWFObject while the bottom one is standard flash. The standard flash one works as expected (but only in IE so far...) any ideas what I am doing wrong? any help greatly appreciated.
have it working now... had to add ?County=<?php echo $_GET['County']; ?> to the first addVariable. If anyone else is stuck with the same type of thing, here is what is working for me. <script type="text/javascript"> var so = new SWFObject("ir_locator.swf", "ir_locator_demo", "250", "350", "8", "#ffffff"); so.addVariable("xmlfile1", "ir_locator_3.php?County=<?php echo $_GET['County']; ?>"); <?php foreach($_GET as $variable => $value) { echo "so.addVariable('$variable', '$value');"; } ?> so.write("flashcontent"); </script>
If you need to generate a value dynamically through php etc, then yes, you have to pass any required vars directly to the php page via a querystring to get the correct output.