2 Questions for you pros!

[Flash8] Ok, I have my file all setup, almost perfect using a few tutorials here on kirupa (AWESOME site!) but I have run into a few issues. My first issue, is I have my “theBtn” mc’s in my scene arraying from the btn XML node, and they count just fine, and I want them to display numbers, hence the theBtn.btn_txt.text = i+1;, but I need them to count as if when I have 2 nodes, 1 gets pushed over, rather then how they are now in which 2 just gets put beside 1. I tried using sort, and have been looking into reverse.Array but neither of these are working. but that is the concept I need. What should I sort or reverse my array too? theBtn?

Ok, my 2nd question, when theBtn comes in and is arrayed, it’s static, unless I rollover it, then it gets a 50% opacity. I need it to show a different color depending on which image is loaded in my slideshow, so inside the mc I made a frame 2 which has the different color box and dynamic text, how do I tell it to go to this frame when my nextImage function is called and reset all the rest to frame 1? I assume it’s this.theBtn.gotoAndStop(nextFrame); but that’s not working, and I know the theBtn is working great because they are clickable and arraying (just backwards) and the alpha works fine on the rollovers for eachone. I hope thismakes sence and I hope someone can help me, so I can get some rest. :snooze:

delay  = 3000;
 
function loadXML(loaded) {
 if (loaded) {
  xmlNode = this.firstChild;
  image = [];
  description = [];
  btn = [];
  total = xmlNode.childNodes.length;
  var xPos = 253;
  for (i=0; i<total; i++) {
   image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
   description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
   btn* = xmlNode.childNodes*.firstChild.nodeValue;
 
   var theBtn = attachMovie("btn", "new"+i, i, {_x:xPos, _y:214});
   xPos  += theBtn._width-42;
   btn_fn(theBtn);
   theBtn.btn_txt.text  = i+1;
 
  }
  firstImage();
 } else {
  content = "file not loaded!";
 }
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
///////////////////////////////////// 
p = 0;
 
this.onEnterFrame = function() {
 filesize = picture.getBytesTotal();
 loaded = picture.getBytesLoaded();
 preloader._visible = true;
 if (loaded != filesize) {
  preloader.preload_bar._xscale = 100*loaded/filesize;
 } else {
  preloader._visible = false;
  if (picture._alpha<100) {
   picture._alpha += 6;
  }
 }
};
function nextImage() {
 if (p<(total-1)) {
  p++;
  if (loaded == filesize) {
   picture._alpha = 0;
   picture.loadMovie(image[p], 1);
   desc_txt.text = description[p];
   clearInterval(myInterval);
   slideshow();
 
  }
 }
}
function firstImage() {
 if (loaded == filesize) {
  picture._alpha = 0;
  picture.loadMovie(image[0], 1);
  this.theBtn.gotoAndStop(nextFrame);
  desc_txt.text = description[0];
  clearInterval(myInterval);
  slideshow();
 }
}
 
play_btn._visible = false;
play_btn.onRelease = function(){
  play_btn._visible=false;
  pause_btn._visible=true;
  myInterval = setInterval(pause_slideshow, delay);
 
 
}
pause_btn.onRelease = function(){
  play_btn._visible=true;
  pause_btn._visible=false;
  clearInterval(myInterval);
 
}
 
function btn_fn (theBtn:MovieClip){
 theBtn.pictureValue = i;
 theBtn.onRelease = function () {
  p = this.pictureValue-1;
  nextImage();
 };
 theBtn.onRollOver = function () {
  this._alpha = 50;
 };
 theBtn.onRollOut = function () {
  this._alpha = 100;
 };
 
}
 
function slideshow() {
 myInterval = setInterval(pause_slideshow, delay);
 function pause_slideshow() {
  clearInterval(myInterval);
  if (p == (total-1)) {
   p = 0;
   firstImage();
  } else {
   nextImage();
  }
 }
}