3 Replies Latest reply on Oct 4, 2010 10:25 AM by Ned Murphy

    Loop images

    Ron Colmen Level 2

      Below is my script and it's not looping through my images. I need each of the 9 images to appear every 10 Seconds and loop?

       

      var urls:Array = new Array();

      var captions:Array = new Array();

      var headings:Array = new Array();

      var currentA:Number;

       

      x.onLoad = function(success) {

      var photos:Array = this.firstChild.childNodes;

      for(i=0;i<9; i++) {

      urls.push(photos[i].attributes.url);

      captions.push(photos[i].attributes.caption);

      headings.push(photos[i].attributes.heading);

      }

      _root.holder.loadMovie(urls[0]);

      _root.caption.text = captions[0];

      _root.heading.text = headings[0];

      currentA = 0;

      }

       

      function(myShow) {

      if(currentA < urls.length-1) {

      currentA++;

          _root.holder.loadMovie(urls[currentA]);

          _root.caption.text = captions[currentA];

      _root.heading.text = headings[currentA];

      }

      }

      var IntervalID = setInterval(myShow, 10000);