Vertically aligning different sized boxes

I have an attached movieclip that duplicates boxes vertically. All the boxes are different heights, because I’ve scripted it to adjust with the amount of xml text contained inside these boxes.

How do I get these boxes to line up right without overlapping eachother?

item = container.attachMovie("result_mc", "item" + i, i);

if (item.description._height >= item.resultBg._height) {
      item.resultBg._height = (20 + item.description._height + item.title._height);

item._y = ((s) * (item.resultBg._height + spacing));