0 Replies Latest reply on Feb 22, 2007 5:35 AM by sundeep_02tv26

    xml photogallery prev and next buttons help.plzzzzz

    sundeep_02tv26
      hai to all plz help me

      this.thumbnails._y = 30;

      myPhoto = new XML();
      myPhoto.ignoreWhite = true;
      myPhoto.load("shirts/shirtprints.xml");
      myPhoto.onLoad = function(success) {

      numimages = this.firstChild.firstChild.childNodes.length;
      spacing = 81;

      for (i=0; i<numimages; i++)
      {
      this.picHolder = this.firstChild.firstChild.childNodes ;
      this.thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i*10);
      this.thumbHolder._y = i*spacing;
      this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 10);
      this.thumbLoader.loadMovie(this.picHolder.attributes.thumb);
      this.thumbHolder.title = this.picHolder.attributes.desc;
      this.thumbHolder.main = this.picHolder.attributes.main;
      this.thumbHolder.onRelease = function() {
      loader._xscale = 75;
      loader._yscale = 75;
      loader.loadMovie(this.main);
      title_txt.text = this.title;
      _root.title_txt.html = true;
      };
      }
      };
      this is my code for loading xml photogallery can any one say how to get the no. of the childnode in xml file which is being displayed now. so that i can make previous and next buttons.

      this is my xml file:-
      <thumb nofimagesperrow="4" nofimagespercol="4" startx="10" starty="10">
      <pic thumb="t_shirts/thumb/more/lips.jpg" main="t_shirts/main/more/lips.jpg" desc="lips"/>
      <pic thumb="t_shirts/thumb/more/fish.jpg" main="t_shirts/main/more/fish.jpg" desc="fish"/>
      <pic thumb="t_shirts/thumb/more/estelle.jpg" main="t_shirts/main/more/estelle.jpg" desc="estelle"/>
      <pic thumb="t_shirts/thumb/more/fire_girl.jpg" main="t_shirts/main/more/fire_girl.jpg" desc="fire girl"/>
      <pic thumb="t_shirts/thumb/more/christy.jpg" main="t_shirts/main/more/christy.jpg" desc="christy"/>
      <pic thumb="t_shirts/thumb/more/bambi.jpg" main="t_shirts/main/more/bambi.jpg" desc="bambi"/>
      <pic thumb="t_shirts/thumb/more/MissyBella.jpg" main="t_shirts/main/more/MissyBella.jpg" desc="MissyBella"/>
      <pic thumb="t_shirts/thumb/more/angel.jpg" main="t_shirts/main/more/angel.jpg" desc="angel"/>
      <pic thumb="t_shirts/thumb/more/butterfly.jpg" main="t_shirts/main/more/butterfly.jpg" desc="butterfly"/>
      <pic thumb="t_shirts/thumb/more/bonnet_girl.jpg" main="t_shirts/main/more/bonnet_girl.jpg" desc="bonnet girl"/>
      <pic thumb="t_shirts/thumb/more/cat_lady.jpg" main="t_shirts/main/more/cat_lady.jpg" desc="cat lady"/>