Dynamic text - complicated script with _y problem

Well, I headed over the Experts Exchange to receive an answer about something else I posted here, and I got one. But while I appreciated immensely the help, and this is really great script which is exactly what I was looking for, the expert told me that he’s “too lazy” to fix the flaw which exists in it, and I’m “on my own”. Being that I’m a newb to AS, that really doesn’t help me much.

The following script loads dynamic text from a .txt file, and creates clickable headers which display the corresponding content below them. There is a _y issue here; the headers overlap and only when they are clicked is the space between them accounted for. I’ll display the code as well as attach my files. Thanks immensely to anyone who can figure this out for me…I’ve been at it for days.

[AS]
data_lv = new LoadVars();
data_lv.onLoad = function(ok) {
if (ok) {
delete this.onLoad;
// trace(unescape(this));
parseData(this);
createDropDownParagraph();
} else {
trace(“Error loading data…”);
}
};
data_lv.load(“data.txt”);
function parseData(d) {
data_arr = new Array();
for (var i = 0; i<parseInt(d.pNum); i++) {
// trace(“Title = " + d[“p” + (i + 1) + “Title”]);
// trace(“Content = " + d[“p” + (i + 1) + “Content”]);
data_arr.push({title:d[“p”+(i+1)+“Title”], content:d[“p”+(i+1)+“Content”]});
}
}
function createDropDownParagraph() {
title_tf = new TextFormat();
title_tf.bold = true;
title_tf.size = 16;
for (var i = 0; i<data_arr.length; i++) {
this.createEmptyMovieClip(“p”+i+”_mc”, 1000+i);
this[“p”+i+"_mc"].id = i;
this[“p”+i+"_mc"].status = false;
this[“p”+i+"_mc"].createTextField(“title_txt”, 1000+i+100i, 100, 0, 300, 10);
this[“p”+i+"_mc"].title_txt.textColor = 0xFFFFFF;
this[“p”+i+"_mc"].title_txt.autoSize = true;
this[“p”+i+"_mc"].title_txt.multiline = true;
this[“p”+i+"_mc"].title_txt.wordWrap = true;
//this[“p” + i + “_mc”].title_txt.border = true;
this[“p”+i+"_mc"].title_txt.html = true;
this[“p”+i+"_mc"].title_txt.htmlText = data_arr
.title;
this[“p”+i+"_mc"].title_txt.setTextFormat(title_tf);
this[“p”+i+"_mc"].onPress = function() {
DisplayText(this, this.id, this.status);
this.status = !this.status;
};
}
}
function DisplayText(loc, id, status) {
this = loc;
// trace(id + " : " + this + " : " + status + " : " + data_arr[id].content);
if (!status) {
// Closed, start opening the paragraph…
trace(“Start opening … “+id);
content_tf = new TextFormat();
//content_tf.bold = true;
content_tf.size = 12;
this.createTextField(“content_txt”, 1000+10+id*10, this.title_txt._x+20, this.title_txt._y+30, 475, 10);
this.content_txt.textColor = 0xFFFFFF;
this.content_txt.autoSize = true;
this.content_txt.multiline = true;
this.content_txt.wordWrap = true;
//this.content_txt.border = true;
this.content_txt.html = true;
this.content_txt.htmlText = data_arr[id].content;
this.content_txt.setTextFormat(content_tf);
} else {
// Opened, start closing the paragraph…
trace(” Start closing … “+this+” : “+id);
this.content_txt.removeTextField();
}
for (var i = id-1; i<data_arr.length; i++) {
this._parent[“p”+i+”_mc”]._y = this._parent[“p”+(i-1)+"_mc"]._y+this._parent[“p”+(i-1)+"_mc"]._height;
}
}
[/AS]