Columns...I would like two columns please...and a large Coke

I am not good at math…I want to be but i missed that day in school. I have this action script for a gallery, this loads some thumbnails:


portfolioInfo = new XML();
portfolioInfo.ignoreWhite = true;
timeline = this;
portfolioInfo.onLoad = function(){
 
 portfolioTag = this.firstChild;
 
trace( count = portfolioTag.childNodes.length);
 
 for (child = 0; child < count; child++){
  
  currentPicture = portfolioTag.childNodes[child];
  
  currentThumb = menu_mc.createEmptyMovieClip("thumbnail"+child,child);
  
  currentThumb._y = child * 40;
  
  image = currentThumb.createEmptyMovieClip("thumbnail_image",0);
  
  image.loadMovie(currentPicture.attributes.THUMB);
  
  currentThumb.NAME = currentPicture.attributes.NAME;
  currentThumb.IMAGE = currentPicture.attributes.IMAGE;
  currentThumb.TEXT = currentPicture.attributes.TEXT;
  currentThumb.TEXT2 = currentPicture.attributes.TEXT2;
  
  currentThumb.onRollOver = currentThumb.onDragOver = function(){
   
   showName_txt.text = this.NAME;
  }
  
  currentThumb.onRollOut = currentThumb.onDragOut = function(){
   
   showName_txt.text = "";
  }
  
  currentThumb.onPress = currentThumb.onDragOver = function(){
   
   image_mc.loadMovie(this.IMAGE);
			  
   info_txt.text = "Loading...";
   syno_txt.text = "Loading...";
   
   timeline.loadVariables(this.TEXT);
   timeline.loadVariables(this.TEXT2);
  }
  
 }
}

portfolioInfo.load("xml/identity_thumbs.xml");

What I would like to do is load the thumbs into two columns…can someone help a poor developing Actionscripter guy?

Thanks,

Plonks

Please, pretty please with sugar on top :slight_smile:

eval(currentThumb)._x=20+40Math.floor(child/2)
eval(currentThumb)._y=20+40
2*(Math.ceil(child/2)-child/2)

Thanks McGiver,
You have done a great thing here. The stuff I tried was waaaaaaaay more comlicated not to mention the fact that it didn’t work. I should have paid more attention in math. Thanks for your help…this place is fantastic!