15 Replies Latest reply on Apr 24, 2008 4:11 PM by kglad

    XML Loop Question

    woopig
      Here is the .as:

      stop();
      timing = 10;
      toadd = "";
      menuxml = new XML();
      menuxml.load(toadd+"xml-header-1.xml");
      menuxml.ignoreWhite = true;
      menuxml.onLoad = function(success) {


      if (success) {
      xmldata = menuxml.firstChild.childNodes;
      maxnum = xmldata.length;
      for (n=0; n<maxnum; n++) {
      specs = menuxml.firstChild.childNodes[n];
      set("toptitle"+n, specs.attributes.toptitle);
      set("maintitle"+n, specs.attributes.maintitle);
      set("url"+n, specs.attributes.theurl);
      set("caption"+n, specs.attributes.caption);
      }
      pic = random(maxnum);

      play();

      }
      };

      How do I make it just loop once? There are a total of 9 images. Thanks to anyone that can help me out.