Help Stringy, Scotty, rhamej someone

I need to modify Stringy’s XML gallery to show 5 rows of 2 galleries instead of 4. I know how to decrease the number of galleries to 6 because Stringy told me the following:

You can change the size of the boxes by changing these variables (or associated variables)

[LEFT][FONT=Courier New]th = [COLOR=#0000ff]Math[/COLOR].[COLOR=#0000ff]round[/COLOR]COLOR=#000000[/COLOR];[/FONT]
[FONT=Courier New]tw = [COLOR=#0000ff]Math[/COLOR].[COLOR=#0000ff]round[/COLOR]COLOR=#000000[/COLOR];[/FONT][/LEFT]

[LEFT]so to make say 3 rows/2 columns you could change to this[/LEFT]

[LEFT][FONT=Courier New]th = [COLOR=#0000ff]Math[/COLOR].[COLOR=#0000ff]round[/COLOR]COLOR=#000000[/COLOR];[/FONT][/LEFT]

So I changed it to the following but I’m still getting just 4 rows for a total of 8 galleries

[FONT=Courier New]th = [COLOR=#0000ff]Math[/COLOR].[COLOR=#0000ff]round[/COLOR]COLOR=#000000[/COLOR];[/FONT]
[FONT=Courier New]tw = [COLOR=#0000ff]Math[/COLOR].[COLOR=#0000ff]round[/COLOR]COLOR=#000000[/COLOR];[/FONT]

[FONT=Courier New]I also tried changing every instance of /4 in the AS to /5 nada[/FONT]

I realize that extra galleries end up on a second page but whoever ends up on the 2nd page will be mad. I’d rather make the page deeper and keep all the galleries on the first page and not have to play favorites.

All the AS from Stringy’s gallery:

//set this to the same as background-for the fade effect.eg/white-{ra:100, rb:255, ga:100, gb:255, ba:100, bb:255, aa:100, ab:0}
colorobject = {ra:100, rb:-255, ga:100, gb:-255, ba:100, bb:-255, aa:100, ab:0};
//these give the colors of the frame
fillcolor = 0x000000;
linecolor = 0xD90502;
//should take the size of the stage-the 30 is for the bars at top /bottom
sizew = Stage.width;
sizeh = Stage.height-30;
cloparray = [];
initi = 0;
initj = 0;
preloader._x = Stage.width/2;
preloader._y = 2/3*Stage.height;
path = "";
myxml = new XML();
myxml.ignoreWhite = true;
myxml.onLoad = parseMe;
myxml.load(path+"tfile2a.xml");
//path to images
path = ""; 
mainarray = [];
sectionarray = [];
var starterx;
var scrollinterval;
//mmm was a mask to cover everything-not used here but i left the code in
mmm._width = sizew;
mmm._height = sizeh+30;
thw = 40;
thh = 40;
var spacex = 10;
var spaceh = 10;
var act;
//Math.round((sizeh-200)/5)
th = Math.round(sizeh/4-(5*spaceh)/4-30/4);
tw = Math.round((sizew/2)-(3*spacex)/2);
 
rraMovie = [];
var boo = this;
dep = 11000;
var screennumber;
var screend = 0;
var thumbscreen = [];
count = 0;
//create thing at top
this.createEmptyMovieClip("mai", 11777);
mai._x = Stage.width/2-sizew/2;
mai.lineStyle(1, linecolor, 100);
mai.beginFill(fillcolor, 100);
mai.lineTo(0, 30);
mai.lineTo(sizew-2, 30);
mai.lineTo(sizew-2, 0);
mai.lineTo(0, 0);
mai.endFill();
mai.attachMovie("heading", "heading", 1);
mai.heading.mytext.text = "Loading XML";
mai.heading._y = 5;
mai.heading._x = sizew/2-mai.heading._width/2-2;
mai.onPress = function() {
};
mai.useHandCursor = false;
function drawsquare1(nm) {
 nm.lineStyle(1, linecolor, 100);
 nm.beginFill(fillcolor, 100);
 nm.lineTo(tw, 0);
 nm.lineTo(tw, th);
 nm.lineTo(0, th);
 nm.lineTo(0, 0);
 nm.endFill();
}
fncClipLoad = function (rfcRra) {
 // Only run this if the stage dimensions have been ascertained.
 if (Stage.width) {
  clearInterval(itvStageDim);
  var icrIdx = 0;
  var blnLoading = 0;
  var rfcClip = createEmptyMovieClip("loadsalot", -1);
  rfcClip._x = Stage.width+200;
  // Move movieclip offstage so it is not seen.
  boo.onEnterFrame = function() {
   if (!blnLoading && icrIdx<rfcRra.length) {
    rfcClip.loadMovie(rfcRra[icrIdx]);
    blnLoading = true;
   } else if (blnLoading) {
    if (rfcClip.getBytesLoaded()>10 && rfcClip.getBytesLoaded()>=rfcClip.getBytesTotal()) {
     blnLoading = false;
     prelop.p._xscale = 100*icrIdx/(rfcRra.length-1);
     ++icrIdx;
     if (icrIdx == 15) {
      mai.heading.mytext.text = "Loading Thumbnails";
      makemain();
     }
    }
   } else {
    // rfcClip.removeMovieClip();
    delete this.onEnterFrame;
    prelop._visible = false;
    //makemain();
    //prelo(mainloader, path+mainarray[0][0].movie);
   }
  };
 }
};
function parseMe(success) {
 if (success) {
  for (var k = 0; k<this.firstChild.childNodes.length; k++) {
   var pictures = this.firstChild.childNodes[k].childNodes;
   //ive not used this array,put the values as attributes instead
   sectionarray.push(this.firstChild.childNodes[k].childNodes[0]);
   boo["array1"+k] = [];
   for (var i = 1; i<pictures.length; i++) {
    rraMovie.push(path+pictures*.attributes.image);
    var objj = {};
    for (var j in pictures*.attributes) {
     objj[j] = pictures*.attributes[j];
    }
    boo["array1"+k].push(objj);
   }
   mainarray.push(boo["array1"+k]);
  }
  fncClipLoad(rraMovie);
 } else {
  "FAILED TO LOAD DATA";
 }
}
function fadeColor(clip, cto, ease) {
 trace(clip);
 var myColor = new Color(clip), cColor = myColor.getTransform();
 //clip.createEmptyMovieClip("baa",100)
 clip.onEnterFrame = function() {
  trace(1);
  for (var c in cColor) {
   cColor[c] += (cto[c]-cColor[c])/ease;
  }
  myColor.setTransform(cColor);
 };
}
function stopauto() {
 main.ppp.fff.g.gotoAndStop(1);
 main.ppp.fff.s.gotoAndStop(1);
 clearInterval(scrollinterval);
}
function makemain() {
 this.createEmptyMovieClip("main", 1000);
 main._x = (Stage.width/2)-(sizew/2);
 main._y = sizeh+20;
 main.createEmptyMovieClip("ppp", 10000);
 main.ppp.lineStyle(1, linecolor, 100);
 main.ppp.beginFill(fillcolor, 100);
 main.ppp.lineTo(0, -30);
 main.ppp.lineTo(sizew-2, -30);
 main.ppp.lineTo(sizew-2, 0);
 main.ppp.lineTo(0, 0);
 main.ppp.endFill();
 //var o = {_y:30};
 var sc = main.ppp.attachMovie("scroller", "scroller", 667);
 sc._width = 2*sizew/3;
 sc._x = sizew/6;
 sc._y = -27;
 //sc.onPress = scrollpress;
 var ssc = sc.createEmptyMovieClip("noholder", 500);
 ssc.setMask(main.ppp.scroller.mask);
 var ss = main.ppp.attachMovie("forward", "ff", 670);
 ss._x = 5*sizew/6+20;
 ss._y = -15;
 ss.onPress = function() {
  this.c.gotoAndStop(2);
  act = false;
  this.enabled = false;
  var gf = setInterval(function () {
   ss.enabled = true;
   ss.c.gotoAndStop(1);
   clearInterval(gf);
  }, 800);
  stopauto();
  scrollpressf();
 };
 var tt = main.ppp.attachMovie("fff", "fff", 870);
 tt._x = 11*sizew/12+20;
 tt._y = -15;
 act = true;
 tt.g.onRollOver = function() {
 };
 tt.g.onPress = function() {
  if (act) {
   clearInterval(scrollinterval);
   main.ppp.fff.s.gotoAndStop(2);
   trace(mainarray[initj].length);
   trace(initi);
   initi++;
   this.gotoAndPlay(2);
   if (initi == mainarray[initj].length) {
    scrollpressb(starterx);
    initi = 0;
   } else if (initi%13 == 0) {
    scrollpressf();
   }
   prelo(foo, path+mainarray[initj][initi].movie, initj, initi);
   for (var obj in leta) {
    leta[obj].gotoAndStop(1);
   }
   leta[initi].gotoAndStop(2);
   scrollinterval = setInterval(function () {
    initi++;
    if (initi == mainarray[initj].length) {
     scrollpressb(starterx);
     initi = 0;
    } else if (initi%13 == 0) {
     scrollpressf();
    }
    prelo(foo, path+mainarray[initj][initi].movie, initj, initi);
    for (var obj in leta) {
     leta[obj].gotoAndStop(1);
    }
    leta[initi].gotoAndStop(2);
   }, 10000);
  } else {
   this.gotoAndStop(40);
   iim = setInterval(function () {
    tt.g.gotoAndStop(1);
    clearInterval(iim);
   }, 500);
  }
 };
 tt.s.onPress = function() {
  stopauto();
 };
 var bb = main.ppp.attachMovie("backward", "bb", 680);
 bb._x = sizew/6-20;
 bb._y = -15;
 bb.onPress = function() {
  this.c.gotoAndStop(2);
  this.enabled = false;
  var ggf = setInterval(function () {
   bb.enabled = true;
   bb.c.gotoAndStop(1);
   clearInterval(ggf);
  }, 800);
  act = false;
  scrollpressb();
  stopauto();
 };
 trace("sc"+sc);
 var ww = main.ppp.attachMovie("window", "ww", 690);
 ww._x = sizew/24;
 ww._y = -25;
 ww.onRollOver = function() {
  this.gotoAndPlay(2);
 };
 ww.onRollOut = ww.onDragOut=function () {
  this.gotoAndStop(1);
 };
 ww.onPress = function() {
  trace(this);
  this.gotoAndStop(1);
  stopauto();
  mmm._height = sizeh+90;
  preloader._visible = false;
  this._parent._parent.onEnterFrame = function() {
   this._y += (30-this._y)/4;
   mai._y += (0-mai._y)/4;
   if (Math.abs(30-this._y)<1) {
    this._y = 30;
    mai._y = 0;
    delete this.onEnterFrame;
    mai.heading.mytext.text="Please select a Gallery below to view the images"
   }
  };
 };
 main.createEmptyMovieClip("pp", 4000);
 //main.setMask(mmm);
 main.pp._y = sizeh-30;
 main.pp.lineStyle(1, linecolor, 100);
 main.pp.beginFill(fillcolor, 100);
 main.pp.lineTo(0, 28);
 main.pp.lineTo(sizew-2, 28);
 main.pp.lineTo(sizew-2, 0);
 main.pp.lineTo(0, 0);
 main.pp.endFill();
 var dase = main.pp.attachMovie("forward", "forward", 22);
 dase._y = 15;
 dase._x = 3*sizew/4;
 dase.onPress = forwardpress;
 dase.onRollOver = function() {
  this.c.gotoAndStop(2);
 };
 dase.onRollOut = dase.onDragOut=dase.onReleaseOutside=function () {
  this.c.gotoAndStop(1);
 };
 var ase = main.pp.attachMovie("backward", "backward", 24);
 ase._y = 15;
 ase._x = sizew/4;
 ase.onPress = backpress;
 ase.onRollOver = function() {
  this.c.gotoAndStop(2);
 };
 ase.onRollOut = ase.onDragOut=ase.onReleaseOutside=function () {
  this.c.gotoAndStop(1);
 };
 ase.enabled = false;
 var tase = main.pp.attachMovie("tex", "tex", 26);
 //tase._y = 15;
 tase._y = 15;
 tase._x = sizew/2;
 /*main.pp.onPress = function() {
 this._parent.onEnterFrame = function() {
 this._y += (sizeh-this._y)/4;
 if (Math.abs(sizeh-this._y)<1) {
 this._y = sizeh;
 delete this.onEnterFrame;
 }
 };
 };
 */
 starterx = 0;
 mf();
 main.ppp.ww.onPress()
}
function forwardpress() {
 if (count<(mainarray.length-1)/8-1) {
  count++;
 }
 main.pp.backward.enabled = true;
 makenails(main["gogo"+count], 8*count);
 if (count == screennumber-1) {
  count = screennumber-1;
  this.enabled = false;
  this.c.gotoAndStop(1);
 }
}
function backpress() {
 main.pp.forward.enabled = true;
 if (count>0) {
  count--;
  makenails(main["gogo"+count], 8*count);
  if (count == 0) {
   this.enabled = false;
   this.c.gotoAndStop(1);
  }
 }
 makenails(main["gogo"+count], 8*count);
}
function mf() {
 var j = Math.ceil(mainarray.length/8);
 screennumber = j;
 for (var ij = 0; ij<=j; ij++) {
  var cop = main.createEmptyMovieClip("gogo"+ij, 220+ij);
  //cop._visible = false;
  //cop._x =(Stage.width/2)-(sizew/2)
  var pk = cop.createEmptyMovieClip("dww", 18);
  thumbscreen.push(cop);
  var pc = cop.createEmptyMovieClip("dw", 12);
  drawsquare(pc);
 }
 makenails(main["gogo"+0], 0, true);
}
function drawsquare(nm) {
 trace(this.getDepth());
 nm.lineStyle(1, 0x000000, 100);
 nm.beginFill(0x000000, 100);
 nm.lineTo(sizew, 0);
 nm.lineTo(sizew, sizeh);
 nm.lineTo(0, sizeh);
 nm.lineTo(0, 0);
 nm.endFill();
}
//var clipname;
function makenails(clipname, i, ins) {
 letout();
 // main.pp.mytext.text ="Gallery page "+count+" of "+Number(screennumber-1)
 main.pp.tex.mytext.text = "GALLERY "+Number(count+1)+"/"+Number(screennumber);
 trace(clipname);
 for (var bj = 0; bj<thumbscreen.length; bj++) {
  if (thumbscreen[bj] != clipname) {
   thumbscreen[bj]._visible = false;
  }
 }
 clipname._visible = true;
 //clipname._parent._visible = true;
 for (var y = 0; y<4; y++) {
  for (var x = 0; x<2; x++) {
   var clip = clipname.attachMovie("t", "t"+i, i+50);
   clip.createEmptyMovieClip("p", 1);
   clip.p.swapDepths(clip.minn);
   drawsquare1(clip.p);
   clip.ivar = i;
   clip._x = spacex+x*(tw+spacex);
   clip._y = spacex+y*(th+spacex);
   if (mainarray[clip.ivar][0].image != undefined) {
    clip.minn.mcholder.mc.loadMovie(path+mainarray[clip.ivar][0].image);
    //trace(clip.mcholder.minn.mc)
    clip.onEnterFrame = function() {
     if (this.minn.mcholder.mc._width>1) {
      this.minn.title.text = mainarray[this.ivar][0].gallerytitle;
      this.minn.body.text = mainarray[this.ivar][0].gallerybody;
      //this.minn.mcholder.mc._width = 20;
      //this.minn.mcholder.mc._height = 20;
      this.minn.mcholder.mc._xscale = this.minn.mcholder.mc._yscale=100;
      //trackerarray.push(clip);
      var w = this.minn.mcholder.mc._width;
      var h = this.minn.mcholder.mc._height;
      if (this.minn.mcholder.mc._width>thw) {
       trace("w"+w);
       this.minn.mcholder.mc._width = thw;
       this.minn.mcholder.mc._height = h*thw/w;
      }
      if (this.minn.mcholder.mc._height>thh) {
       this.minn.mcholder.mc._height = thh;
       this.minn.mcholder.mc._width = w*(thh)/h;
      }
      this.minn.mcholder.white._width = this.minn.mcholder.mc._width+4;
      this.minn.mcholder.white._height = this.minn.mcholder.mc._height+4;
      this.onPress = function() {
       clippress.apply(this);
      };
      delete this.onEnterFrame;
     }
    };
    i++;
   } else {
    clip.removeMovieClip();
   }
  }
 }
 if (ins == true) {
  clippress.apply(main.gogo0.t0);
 }
}
var cl = boo.createEmptyMovieClip("foo", 666);
var z = 6000;
function clippress() {
 trace(this);
 delete main.ppp.scroller.noholder.onEnterFrame;
 main.ppp.scroller.noholder._x = 0;
 //starterx = main.ppp.scroller.noholder._x+main.ppp.scroller.mask._width;
 //var cl = boo.createEmptyMovieClip("foo", 666);
 //trace(mainarray[this.ivar][0].movie);
 for (var obj in main.ppp.scroller.noholder) {
  main.ppp.scroller.noholder[obj].removeMovieClip();
 }
 leta = [];
 for (var i = 0; i<mainarray[this.ivar].length; i++) {
  var let = main.ppp.scroller.noholder.attachMovie("scrolltex", "st"+i, i);
  if (i+1<10) {
   let.mytext.text = "0"+Number(i+1);
  } else {
   let.mytext.text = i+1;
  }
  let.jvar = this.ivar;
  let.ivar = i;
  let._x = i*let._width;
  let.createEmptyMovieClip("letter", 5);
  let.clip = boo.attachMovie("thumbo", "thumbo"+z, z);
  thumbo._visible = false;
  //lets++;
  let.onRollOver = letover;
  let.onRollOut = let.onDragOut=let.onReleaseOutside=letout;
  //trace("j"+let.jvar +"i"+let.ivar)
  let.onPress = letpress;
  leta.push(let);
 }
 //foo.loadMovie("images/"+mainarray[this.ivar][0].movie);
 fadeColor(foo, colorobject, 5);
 ////////////////////////////
 if(loadk !=undefined){
 prelo(foo, path+mainarray[this.ivar][0].movie, this.ivar, 0);
 
 }
 loadk=true
 main.onEnterFrame = function() {
  this._y += (sizeh+28-this._y)/4;
  mmm._height += ((sizeh+30)-mmm._height)/4;
  if (Math.abs(sizeh+30-this._y)<1) {
   this._y = sizeh+30;
   mm._height = sizeh+30;
   preloader._visible = true;
   delete this.onEnterFrame;
  }
 };
}
var current;
function letover() {
 //this.clip._x = this._parent._x+main.ppp.scroller._x+this._x
 this.clip._visible = false;
 this.clip._y = main._y+this._parent._parent._y+this._y;
 this.clip.h.loadMovie(path+mainarray[this.jvar][this.ivar].image);
 var u = 0;
 boo.current = this;
 this.letter.onEnterFrame = function() {
  //this._parent.clip._x = _xmouse;
  if (this._parent.clip.h._width>0) {
   this._parent.clip._x = _xmouse;
   this._parent.clip.s._width = this._parent.clip.h._width+4;
   trace(this.s);
   this._parent.clip.s._height = this._parent.clip.h._height+4;
   this._parent.clip.h._x = 2+this._parent.clip.s._x-this._parent.clip.s._width/2;
   this._parent.clip.h._y = 2+this._parent.clip.s._y-this._parent.clip.s._height;
   this._parent.clip._visible = true;
   //delete this.onEnterFrame;
  }
 };
}
function letout() {
 delete current.letter.onEnterFrame;
 boo["thumbo"+6000]._visible = false;
}
//press for scroller forward
function scrollpressf() {
 //stopauto()
 //main.ppp.ff.enabled = false
 var x;
 if (main.ppp.scroller.noholder._x+main.ppp.scroller.noholder._width<main.ppp.scroller.mask._width+10) {
  x = main.ppp.scroller.noholder._x;
 } else {
  x = main.ppp.scroller.noholder._x-main.ppp.scroller.mask._width;
 }
 main.ppp.scroller.noholder.onEnterFrame = function() {
  this._x += (x-this._x)/5;
  if (Math.abs(x-this._x)<2) {
   this._x = x;
   //boo.main.ppp.ss.enabled = true
   delete this.onEnterFrame;
  }
 };
}
//pres for scroller back
function scrollpressb(qw) {
 //stopauto()
 var x = starterx;
 if (qw != undefined) {
  x = qw;
 } else {
  x = main.ppp.scroller.noholder._x+main.ppp.scroller.mask._width;
 }
 trace(x+"x");
 main.ppp.scroller.noholder.onEnterFrame = function() {
  if (this._x<0) {
   this._x += (x-this._x)/5;
   if (Math.abs(x-this._x)<2) {
    this._x = x;
    delete this.onEnterFrame;
   }
  }
 };
}
function letpress() {
 act = true;
 for (var obj in leta) {
  leta[obj].gotoAndStop(1);
 }
 this.gotoAndStop(2);
 stopauto();
 //_level0.main.ppp.scroller.noholder.st23
 trace("main"+main._x);
 trace("ppp"+ppp._x);
 trace("main.ppp.scroller"+main.ppp.scroller._x);
 trace("main.ppp.scroller.noholder"+main.ppp.scroller.noholder._x);
 trace(this._x);
 letout();
 fadeColor(foo, {ra:100, rb:-255, ga:100, gb:-255, ba:100, bb:-255, aa:100, ab:0}, 5);
 prelo(foo, path+mainarray[this.jvar][this.ivar].movie, this.jvar, this.ivar);
 //myinterval = setInterval(function(){foo.loadMovie("images/"+mainarray[this.jvar][this.ivar].movie);clearInterval(myinterval)},2000)
}
this.createEmptyMovieClip("prelcheck", -300);
preloader.swapDepths(14000);
function prelo(clip, movie, b1, b2) {
 initj = b1;
 initi = b2;
 preloader.gotoAndPlay("IN");
 var myvar = true;
 prelcheck.onEnterFrame = function() {
  if (preloader._currentframe == 15) {
   preloader.stop();
   if (myvar == true) {
    clip._alpha = 0;
    clip.loadMovie(movie);
    myvar = false;
   }
   var bl = clip.getBytesLoaded();
   var bt = clip.getBytesTotal();
   var pct = bl/bt;
   var cf = preloader.progress_mc._currentframe;
   var tf = preloader.progress_mc._totalframes;
   var f = Math.ceil(tf*pct);
   if (f>cf) {
    preloader.progress_mc.play();
   } else {
    preloader.progress_mc.stop();
   }
   preloader.pct_str = (Math.round(cf/tf*100)).toString();
   if (bt>20 && bl == bt && cf == tf && preloader.progress_mc) {
    preloader.gotoAndPlay("OUT");
    clip._xscale = clip._yscale=100;
    //trackerarray.push(clip);
 
    clip._x = Stage.width/2-clip._width/2;
    clip._y = sizeh-clip._height;
    delete this.onEnterFrame;
    mai.onEnterFrame = function() {
     this._y += ((foo._y-30)-this._y)/3;
     if (Math.abs((foo._y-30)-this._y)<4) {
      this._y = foo._y-30;
      foo._alpha = 100;
      trace(foo+"fp"+foo._alpha);
      fadeColor(foo, {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0}, 20);
      delete this.onEnterFrame;
      this.heading.mytext.text = "Builder :  "+mainarray[b1][0].gallerytitle+"            Home :  "+mainarray[b1][b2].title;
      trace("b1"+b1);
     }
    };
   }
  }
 };
}
/*
setInterval(function () {
main._y -= 20;
}, 5000);
*/