5 Replies Latest reply on Apr 9, 2010 7:09 AM by PromediaOhio

    Dynamic file path problem....

    PromediaOhio

      Hello & thanks for your attention

       

      I am trying to modify the action script(2) of a XML photo slideshow
      I want to make it pull the photo array from a dynamic XML file

       

      Yet nothing I try seems to be working - I was hoping someone could look at these snippets and tell me if I'm doing something incorrectly

       

      Objective:
      To make the swf file - pull its photo array - from a dynamic XML file path

       

      Scenario:
      http://www.reallivingtours.com/tours/viewTour.php?id=2092

       

      When that URL is called by a browser
      An XML file called 2092.xml is created in a /tmp/ directory

       

      viewTour.php passes the ‘dynamic’ file path to the swf via the params

       

      <param name="movie" value="slideshow.swf?file=tmp/<?php echo $tourID; ?>.xml">
      <param name="flashvars" value="&file=tmp/<?php echo $tourID; ?>.xml">

       

      The original AS2:
      var xml:XML = new XML();
      xml.ignoreWhite = true;
      _root.xmlPath == undefined ? xml.load("settings.xml") : xml.load(_root.xmlPath);

       

      The modified AS2 - I've done:
      var filePath:String = new String();
      filePath =_root.file;

       

      var xml:XML = new XML();
      xml.ignoreWhite = true;
      _root.xmlPath == undefined ? xml.load(new URLRequest(filePath)) : xml.load(_root.xmlPath);

       


      Can you see anything I'm doing incorrectly?

       

      Thank you very much for your time and attention
      Benn