Not signed in (Sign In)

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

  1.  
    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.
  2.  
    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>
    • CommentAuthorAran
    • CommentTimeOct 20th 2007
     
    Looks good to me.

    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.