1 Reply Latest reply on Jun 12, 2007 7:50 AM by SGIenthousiast

    XML Slideshow

    swordfish_sam
      Hi,

      Can any one please tell me dat how to achieve next, back and autoplay for my XML image viewer that i have created.

      I have a loader component in which i am calling the images from an XML file through XML Connector component. And i have three buttons next, back and autoplay through which i want to view the next images located in the xml file.

      Content in the xml file is below:
      -----------------------------------------------------------------------------------
      <?xml version="1.0" encoding="utf-8" standalone="yes"?>
      <images>
      <pic>
      <image>images/soldier.jpg</image>
      <caption>I am a soldier..</caption>
      </pic>
      <pic>
      <image>images/women.jpg</image>
      <caption>Play it on..</caption>
      </pic>
      <pic>
      <image>images/abstract.jpg</image>
      <caption>Visualize me..</caption>
      </pic>
      <pic>
      <image>images/tiger.jpg</image>
      <caption>I am the king..</caption>
      </pic>
      <pic>
      <image>images/elephant.jpg</image>
      <caption>I am intelligent..</caption>
      </pic>
      <pic>
      <image>images/butterfly.jpg</image>
      <caption>I am cool..</caption>
      </pic>
      </images>
      --------------------------------------------------------------------

      Actions in the first frame of the timeline:
      ---------------------------------------------------------------
      myConnect.trigger();
      ///////////////////
      var sXml:String;
      myXML = new XML();
      myXML.ignoreWhite = true;
      myXML.load('images.xml');
      myXML.onLoad = function(success) {
      if (success) {
      sXml = myXML.firstChild.firstChild.nextSibling.firstChild.firstChild;
      //trace(sXml);
      //trace(myXML.firstChild.firstChild.nextSibling.firstChild);
      }
      };
      next_btn.onRelease = function() {
      //trace(sXml);
      myLoader.contentPath = sXml;
      };
      ---------------------------------------------

      Please help me it is very urgent.